javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Label.java
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Label.java Tue Jul 06 14:10:26 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Label.java Wed Aug 18 09:43:15 2010 +0300
@@ -127,10 +127,11 @@
}
checkWidget();
+
if (changed) {
OS.QWidget_updateGeometry(handle);
}
-
+
/**
* ComputeSize in super class is not able to handle the situation that
* preferred height depends on the width. So ask QLabel for preferred
@@ -167,6 +168,7 @@
else
height = defaultLength;
}
+
return new Point(width, height);
}
@@ -329,6 +331,25 @@
OS.QPixmap_delete(pixmapHandle);
}
}
+
+ void setThemeIcon(String name) {
+ checkWidget();
+ if ((style & SWT.SEPARATOR) != 0)
+ return;
+ int iconHandle = 0;
+ int pixmapHandle = 0;
+ try {
+ iconHandle = OS.HbIcon_new(name);
+ if (iconHandle != 0)
+ pixmapHandle = OS.HbIcon_pixmap(iconHandle);
+ if (pixmapHandle != 0)
+ OS.QLabel_setPixmap(topHandle, pixmapHandle);
+ } finally {
+ OS.HbIcon_delete(iconHandle);
+ OS.QPixmap_delete(pixmapHandle);
+ }
+ }
+
void setStyle(int style) {
int qStyle = 0;