Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2018-07-11 17:09:51 -0400
committerXi Yan2018-07-12 09:00:05 -0400
commitaa6ec80394726cc1fabffa61de97a14d611d576f (patch)
tree47e9c066ff7f1fefc98a0e43bf299f603fa0b98c
parentef6637c350bdbdb962639ec7696e457915702a76 (diff)
downloadeclipse.platform.swt-aa6ec80394726cc1fabffa61de97a14d611d576f.tar.gz
eclipse.platform.swt-aa6ec80394726cc1fabffa61de97a14d611d576f.tar.xz
eclipse.platform.swt-aa6ec80394726cc1fabffa61de97a14d611d576f.zip
Bug 531561 (Snippet231_ShellPacking) - [Gtk3] Snippet231 packing makes
shell have too short window height. computeNativeSize sometimes return 0 as height, calculate the table height based on the number of items. Change-Id: I098ff38340b0bfb58a22455e4ec13f8781430068 Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java2
1 files changed, 1 insertions, 1 deletions
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 c34d6ba611..4cead3c454 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
@@ -517,7 +517,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
* height as height. In that case, calculate the table height based on
* the number of items in the table.
*/
- if (hHint == SWT.DEFAULT && size.y == getHeaderHeight()) {
+ if (hHint == SWT.DEFAULT && (size.y == getHeaderHeight()) || size.y == 0) {
size.y = getItemCount() * getItemHeight() + getHeaderHeight();
}
/*

Back to the top