Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2018-07-12 18:55:35 +0000
committerXi Yan2018-07-12 18:55:35 +0000
commit0008973265c0c2715f8ed3db90f61093fdcc4499 (patch)
tree77c9e2fdcc2109a8056c4543c3f366b803c9c1bb /bundles/org.eclipse.swt
parent28bc056590903b35966c288e66260417555f4e5d (diff)
downloadeclipse.platform.swt-0008973265c0c2715f8ed3db90f61093fdcc4499.tar.gz
eclipse.platform.swt-0008973265c0c2715f8ed3db90f61093fdcc4499.tar.xz
eclipse.platform.swt-0008973265c0c2715f8ed3db90f61093fdcc4499.zip
Bug 536900 - [GTK3] New java class dialog renders a strange gray box as
separator For GTK3.20+, GtkSeparator with GTK_ALIGN_FILL renders a gray box that takes the entire area rather than a single line. The fix is to set the valign and halign to GTK_ALIGN_CENTER for the horizontal and vertical separators, respectively, after creating the handles. Tested with New Java class Dialog and Snippet37. Change-Id: Ia11e917885af6cce61a2b21961f4bd27c4cbb910 Signed-off-by: Xi Yan <xixiyan@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java6
1 files changed, 6 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 c52a1ccf92..2bc1c39727 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
@@ -237,8 +237,14 @@ void createHandle (int index) {
if ((style & SWT.SEPARATOR) != 0) {
if ((style & SWT.HORIZONTAL)!= 0) {
handle = gtk_separator_new (GTK.GTK_ORIENTATION_HORIZONTAL);
+ if (handle != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ GTK.gtk_widget_set_valign(handle, GTK.GTK_ALIGN_CENTER);
+ }
} else {
handle = gtk_separator_new (GTK.GTK_ORIENTATION_VERTICAL);
+ if (handle != 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ GTK.gtk_widget_set_halign(handle, GTK.GTK_ALIGN_CENTER);
+ }
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
} else {

Back to the top