diff options
author | Felipe Heidrich | 2006-08-03 19:51:17 +0000 |
---|---|---|
committer | Felipe Heidrich | 2006-08-03 19:51:17 +0000 |
commit | bdc0c77fdb7230eb3504e3bf904df9e0ed9d00b0 (patch) | |
tree | 788ed1eedffe748a4fe6d1290e9bcd9930cadb7b | |
parent | a191fe2df10f4f2057b3192d3d1b5ae324733260 (diff) | |
download | eclipse.platform.swt-bdc0c77fdb7230eb3504e3bf904df9e0ed9d00b0.tar.gz eclipse.platform.swt-bdc0c77fdb7230eb3504e3bf904df9e0ed9d00b0.tar.xz eclipse.platform.swt-bdc0c77fdb7230eb3504e3bf904df9e0ed9d00b0.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java | 9 |
1 files changed, 9 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 17630136cf..2ccf90b588 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 @@ -135,6 +135,15 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (fixWrap) { OS.gtk_widget_set_size_request (labelHandle, labelWidth [0], labelHeight [0]); } + /* + * Feature in GTK. Instead of using the font height to determine + * the preferred height of the widget, GTK uses the text metrics. + * The fix is to ensure that the preferred height is at least as + * tall as the font height. + * + * NOTE: This work around does not fix the case when there are + * muliple lines of text. + */ if (hHint == SWT.DEFAULT && labelHandle != 0) { int /*long*/ layout = OS.gtk_label_get_layout (labelHandle); int /*long*/ context = OS.pango_layout_get_context (layout); |