aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2014-06-19 04:13:15 (EDT)
committerSravan Kumar Lakkimsetti2014-07-17 03:54:03 (EDT)
commitd3668980a49a938e8d52e74249fda7626d197187 (patch)
tree435ddc22f8a4bf225fc1e30e3794e01bc5bf5bcc
parent2e2b2f4735cfa6d7a2dac085029a8609a730cd35 (diff)
downloadeclipse.platform.swt-d3668980a49a938e8d52e74249fda7626d197187.zip
eclipse.platform.swt-d3668980a49a938e8d52e74249fda7626d197187.tar.gz
eclipse.platform.swt-d3668980a49a938e8d52e74249fda7626d197187.tar.bz2
Bug 436098 - [GTK3] Cannot reduce column width by draggingrefs/changes/14/30014/1
Change-Id: I164d36c28253aafc003fa5e4fb5ef652b13509aa Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java10
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 3b92e1b..7c40b72 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 7d9f81f..e2b6bdb 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 4b475a2..84fb716 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);
}
/*