Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2014-06-19 08:13:15 +0000
committerAlexander Kurtakov2014-07-16 08:06:11 +0000
commit807366ceccc074335641488dd09c21024735cd07 (patch)
tree88667001bfd5339b52e2161bc916f46cb5ae3684
parent0ee9dc624242e96310f7ac5bdd1e7905d3b51c32 (diff)
downloadeclipse.platform.swt-807366ceccc074335641488dd09c21024735cd07.tar.gz
eclipse.platform.swt-807366ceccc074335641488dd09c21024735cd07.tar.xz
eclipse.platform.swt-807366ceccc074335641488dd09c21024735cd07.zip
Bug 436098 - [GTK3] Cannot reduce column width by dragging
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 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);
}
/*

Back to the top