summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-14 12:45:07 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-14 12:45:07 -0500
commiteacb643a2084a943e492a6d2e0b869a5541e3c3c (patch)
treedd56c345096333dc2eb3994bd67980c48071e219
parentacdeb329f2d46c7be9276a0eb9547f3938f5891a (diff)
downloadeclipse.platform.swt-eacb643a2084a943e492a6d2e0b869a5541e3c3c.tar.gz
eclipse.platform.swt-eacb643a2084a943e492a6d2e0b869a5541e3c3c.tar.xz
eclipse.platform.swt-eacb643a2084a943e492a6d2e0b869a5541e3c3c.zip
Bug 393726 - [GTK3] Views tabs are too tall
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 96ebcbf79a..2e038b6a53 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -140,11 +140,15 @@ void createHandle (int index) {
}
/*
* Bug in GTK. GTK will segment fault if gtk_widget_reparent() is called
- * on a toolbar or on a widget hierarchy containing a toolbar when the icon
+ * on a tool bar or on a widget hierarchy containing a tool bar when the icon
* size is not GTK_ICON_SIZE_LARGE_TOOLBAR. The fix is to set the icon
* size to GTK_ICON_SIZE_LARGE_TOOLBAR.
+ *
+ * Note that the segmentation fault does not happen on GTK 3, but the
+ * tool bar preferred size is too big with GTK_ICON_SIZE_LARGE_TOOLBAR
+ * when the tool bar item has no image or text.
*/
- OS.gtk_toolbar_set_icon_size (handle, OS.GTK_ICON_SIZE_LARGE_TOOLBAR);
+ OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR);
}
public Point computeSize (int wHint, int hHint, boolean changed) {