javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Label.java
equal
deleted
inserted
replaced
125 || (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)) { |
125 || (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)) { |
126 return super.computeSize(wHint, hHint, changed); |
126 return super.computeSize(wHint, hHint, changed); |
127 } |
127 } |
128 |
128 |
129 checkWidget(); |
129 checkWidget(); |
|
130 |
130 if (changed) { |
131 if (changed) { |
131 OS.QWidget_updateGeometry(handle); |
132 OS.QWidget_updateGeometry(handle); |
132 } |
133 } |
133 |
134 |
134 /** |
135 /** |
135 * ComputeSize in super class is not able to handle the situation that |
136 * ComputeSize in super class is not able to handle the situation that |
136 * preferred height depends on the width. So ask QLabel for preferred |
137 * preferred height depends on the width. So ask QLabel for preferred |
137 * height or width. |
138 * height or width. |
138 */ |
139 */ |
165 if (wHint == SWT.DEFAULT) |
166 if (wHint == SWT.DEFAULT) |
166 width = defaultLength; |
167 width = defaultLength; |
167 else |
168 else |
168 height = defaultLength; |
169 height = defaultLength; |
169 } |
170 } |
|
171 |
170 return new Point(width, height); |
172 return new Point(width, height); |
171 } |
173 } |
172 |
174 |
173 void createHandle_pp(int index) { |
175 void createHandle_pp(int index) { |
174 if ((style & SWT.SEPARATOR) != 0) { |
176 if ((style & SWT.SEPARATOR) != 0) { |
327 } finally { |
329 } finally { |
328 OS.QIcon_delete(iconHandle); |
330 OS.QIcon_delete(iconHandle); |
329 OS.QPixmap_delete(pixmapHandle); |
331 OS.QPixmap_delete(pixmapHandle); |
330 } |
332 } |
331 } |
333 } |
|
334 |
|
335 void setThemeIcon(String name) { |
|
336 checkWidget(); |
|
337 if ((style & SWT.SEPARATOR) != 0) |
|
338 return; |
|
339 int iconHandle = 0; |
|
340 int pixmapHandle = 0; |
|
341 try { |
|
342 iconHandle = OS.HbIcon_new(name); |
|
343 if (iconHandle != 0) |
|
344 pixmapHandle = OS.HbIcon_pixmap(iconHandle); |
|
345 if (pixmapHandle != 0) |
|
346 OS.QLabel_setPixmap(topHandle, pixmapHandle); |
|
347 } finally { |
|
348 OS.HbIcon_delete(iconHandle); |
|
349 OS.QPixmap_delete(pixmapHandle); |
|
350 } |
|
351 } |
|
352 |
332 |
353 |
333 void setStyle(int style) { |
354 void setStyle(int style) { |
334 int qStyle = 0; |
355 int qStyle = 0; |
335 if ((style & SWT.SEPARATOR) != 0) { |
356 if ((style & SWT.SEPARATOR) != 0) { |
336 if ((style & SWT.VERTICAL) != 0) { |
357 if ((style & SWT.VERTICAL) != 0) { |