diff options
author | Simeon Andreev | 2018-05-15 14:47:15 +0000 |
---|---|---|
committer | Eric Williams | 2018-05-15 14:51:50 +0000 |
commit | d6a5bea94a14113a5363a496b62a062bef433a11 (patch) | |
tree | 1a46fd176423eb417aaa7e46e9931a40a0b6e6c8 /bundles | |
parent | 80fe1536c3d11b86e6d6129e21a54dc34d8422d9 (diff) | |
download | eclipse.platform.swt-d6a5bea94a14113a5363a496b62a062bef433a11.tar.gz eclipse.platform.swt-d6a5bea94a14113a5363a496b62a062bef433a11.tar.xz eclipse.platform.swt-d6a5bea94a14113a5363a496b62a062bef433a11.zip |
Bug 534692 - Scrollbar area in compare editor too small
The fix for bug 533799 causes a regression, which manifests as a
too-short vertical scroll bar in the Compare Editor.
The regression is caused by changing the implementation of
Scrollable.hScrollBarWidth() to return the width instead of the height
of the computed GTK preferred size requisition. This was due to an
oversight during refactoring.
This change restores the original API functionality, in return fixing
the layout of the compare editor.
Change-Id: I776df3efd8811b8a5fd2360691396d72cc3a6a3f
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Diffstat (limited to 'bundles')
3 files changed, 2 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index d39b5b968c..edbadcb667 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -364,11 +364,6 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { int hScrollBarWidth() { Point hScrollbarSize = hScrollbarSize(); - return hScrollbarSize.x; -} - -int hScrollBarHeight() { - Point hScrollbarSize = hScrollbarSize(); return hScrollbarSize.y; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index f081035078..bc65f91694 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -4211,7 +4211,7 @@ Point resizeCalculationsGTK3 (long /*int*/ widget, int width, int height) { * and the horizontal scrollbar is only partially visible so that it doesn't overlap with table headers. */ if (widget == scrolledHandle && GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && getHeaderVisible()) { - int hScrollBarHeight = hScrollBarHeight(); + int hScrollBarHeight = hScrollBarWidth(); // this actually returns height if (hScrollBarHeight > 0) { sizes.y = Math.max(sizes.y, getHeaderHeight() + hScrollBarHeight + (getBorderWidth() * 2)); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 7b0c6d4f18..33cc37bce7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -4128,7 +4128,7 @@ Point resizeCalculationsGTK3 (long /*int*/ widget, int width, int height) { * and the horizontal scrollbar is only partially visible so that it doesn't overlap with tree headers. */ if (widget == scrolledHandle && GTK.GTK_VERSION >= OS.VERSION(3, 14, 0) && getHeaderVisible()) { - int hScrollBarHeight = hScrollBarHeight(); + int hScrollBarHeight = hScrollBarWidth(); // this actually returns height if (hScrollBarHeight > 0) { sizes.y = Math.max(sizes.y, getHeaderHeight() + hScrollBarHeight + (getBorderWidth() * 2)); } |