Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2018-07-04 15:17:17 +0000
committerXi Yan2018-07-04 16:18:35 +0000
commit1a1abf02ef00454028e2dd25c5242ae4b8cc162b (patch)
tree5c0a3093f80e2c3e82cfaea3a94562c23d6681b6
parent3b6cbf693da065f49bef820d886990d8397f3ebc (diff)
downloadeclipse.platform.swt-1a1abf02ef00454028e2dd25c5242ae4b8cc162b.tar.gz
eclipse.platform.swt-1a1abf02ef00454028e2dd25c5242ae4b8cc162b.tar.xz
eclipse.platform.swt-1a1abf02ef00454028e2dd25c5242ae4b8cc162b.zip
Bug 510540 - Drop Down & Number Menu Items Do Not Show Contents
Ignore wHint if it is too small to include the adjustment buttons for Spinner in GTK3. Change-Id: I8a6bec2b6fc4fcbdd7f825b355ea1852b3e2f64c Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index fb08b65cb5..e28c5794fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
@@ -239,7 +239,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
GTK.gtk_widget_set_size_request (handle, wHint, hHint);
GtkRequisition requisition = new GtkRequisition ();
GTK.gtk_widget_get_preferred_size (handle, requisition, null);
- width = wHint == SWT.DEFAULT ? requisition.width : wHint;
+ width = wHint == SWT.DEFAULT ? requisition.width : Math.max(wHint, requisition.width);
height = hHint == SWT.DEFAULT ? requisition.height : hHint;
} else {
OS.pango_layout_get_pixel_size (layout, w, h);

Back to the top