diff options
author | Billy Biggs <bbiggs> | 2005-05-05 20:46:37 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2005-05-05 20:46:37 +0000 |
commit | 193a52751c01651e74d0f4a6a33166ab2cafe9ee (patch) | |
tree | d99d8b541807e14e944b1f49e63e131f195d3ab1 | |
parent | e3bb881b0cdd2db55a9a19f1b164cd7160de873a (diff) | |
download | eclipse.platform.swt-193a52751c01651e74d0f4a6a33166ab2cafe9ee.tar.gz eclipse.platform.swt-193a52751c01651e74d0f4a6a33166ab2cafe9ee.tar.xz eclipse.platform.swt-193a52751c01651e74d0f4a6a33166ab2cafe9ee.zip |
93848
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index d0005a6016..9c815a1b5c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -403,6 +403,18 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize int labelWidth = OS.GTK_WIDGET_WIDTH (handle); int labelHeight = OS.GTK_WIDGET_HEIGHT (handle); OS.gtk_widget_set_size_request (labelHandle, labelWidth, labelHeight); + /* + * Bug in GTK. Setting the size request should invalidate the label's + * layout, but it does not. The fix is to resize the label directly. + */ + GtkRequisition requisition = new GtkRequisition (); + OS.gtk_widget_size_request (labelHandle, requisition); + GtkAllocation allocation = new GtkAllocation (); + allocation.x = OS.GTK_WIDGET_X (labelHandle); + allocation.y = OS.GTK_WIDGET_Y (labelHandle); + allocation.width = labelWidth; + allocation.height = labelHeight; + OS.gtk_widget_size_allocate (labelHandle, allocation); } return result; } |