diff options
| author | Eric Williams | 2016-03-31 19:53:43 +0000 |
|---|---|---|
| committer | Eric Williams | 2016-04-01 14:21:14 +0000 |
| commit | b25636194fb9a2fb5329522cd28d1f794bd08d14 (patch) | |
| tree | 96d5cbae77f79401409b1ec50e857c482bc4974a | |
| parent | 429cd4e4ecbd8dbfaed902ac7f054c2adda254fe (diff) | |
| download | eclipse.platform.swt-b25636194fb9a2fb5329522cd28d1f794bd08d14.tar.gz eclipse.platform.swt-b25636194fb9a2fb5329522cd28d1f794bd08d14.tar.xz eclipse.platform.swt-b25636194fb9a2fb5329522cd28d1f794bd08d14.zip | |
Bug 487023: [GTK3.20] Update SWT to use proper GTK CSS nodes/selectors
This patch updates the globally loaded CSS in Device to make ToolBars
more reasonably sized on GTK3.20.
The size of the workbench toolbar after this patch is the same as on
GTK3.18.
Change-Id: I4c55762dae0274ad262532b12e8f9e6e6ae9fae2
Signed-off-by: Eric Williams <ericwill@redhat.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index 2828ba2e89..3bdf43ad48 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -714,11 +714,19 @@ protected void init () { + "GtkToolbar GtkMenuButton {padding: 1px 0px 1px 0px;}\n"; } else { css = - "toolbar {padding-top: 4px; padding-bottom: 4px;}\n" + "toolbar {padding-top: 2x; padding-bottom: 2px;}\n" + "toolbar button {padding: 2px;}" + "toolbar button.popup {padding: 0px;}\n" + + "toolbar toolbutton button {padding: 0px 0px 0px 0px;}" + "scrolledwindow undershoot.top, scrolledwindow undershoot.right, scrolledwindow undershoot.bottom, " + "scrolledwindow undershoot.left {background-image: none;}\n"; + /* + * Feature in GTK3.20: Entries have increased minimum heights + * causing them to be larger than usual. The fix is to + * adjust the minimum height to make them more like GTK3.18 + * and below. + */ + css += "entry {min-height: 26px;}"; } if (css != null) { OS.gtk_style_context_add_provider_for_screen (screen, provider, OS.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
