diff options
3 files changed, 8 insertions, 24 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 89f9f74810..05872080b8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -722,17 +722,17 @@ Point computeNativeSize (long /*int*/ h, int wHint, int hHint, boolean changed) if (OS.GTK3){ if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { GtkRequisition requisition = new GtkRequisition (); - OS.gtk_widget_get_preferred_size (h, requisition, null); + OS.gtk_widget_get_preferred_size (h, null, requisition); width = requisition.width; height = requisition.height; } else if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { - int [] minimum_size = new int [1]; + int [] natural_size = new int [1]; if (wHint == SWT.DEFAULT) { - OS.gtk_widget_get_preferred_width_for_height (h, height, minimum_size, null); - width = minimum_size [0]; + OS.gtk_widget_get_preferred_width_for_height (h, height, null, natural_size); + width = natural_size [0]; } else { - OS.gtk_widget_get_preferred_height_for_width (h, width, minimum_size, null); - height = minimum_size [0]; + OS.gtk_widget_get_preferred_height_for_width (h, width, null, natural_size); + height = natural_size [0]; } } return new Point(width, height); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index 7d9f81f87d..e2b6bdb809 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -694,14 +694,6 @@ public void setWidth (int width) { if (width == lastWidth) return; if (width > 0) { useFixedWidth = true; - /* - * From GTK3 docs: - * Note that fixed_width is only a hint to GTK+; the width actually allocated to the column may be greater or less than requested. - * Thus setting the min_width to is required in order to not be zero. - */ - if (OS.GTK3) { - OS.gtk_tree_view_column_set_min_width (handle, width); - } OS.gtk_tree_view_column_set_fixed_width (handle, width); } /* diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index 4b475a2452..84fb716614 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -694,14 +694,6 @@ public void setWidth (int width) { if (width == lastWidth) return; if (width > 0) { useFixedWidth = true; - /* - * From GTK3 docs: - * Note that fixed_width is only a hint to GTK+; the width actually allocated to the column may be greater or less than requested. - * Thus setting the min_width to is required in order to not be zero. - */ - if (OS.GTK3) { - OS.gtk_tree_view_column_set_min_width (handle, width); - } OS.gtk_tree_view_column_set_fixed_width (handle, width); } /* |