summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2006-05-02 18:14:23 +0000
committerFelipe Heidrich <fheidric>2006-05-02 18:14:23 +0000
commit6f7e13302682818f09eae23755fc604e97a36287 (patch)
tree3e8e64439533d2bddcad1b696dd9899145136838 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
parent3f92c6f0fc3dca30dca82dabb4b8ec80f538abd5 (diff)
downloadeclipse.platform.swt-6f7e13302682818f09eae23755fc604e97a36287.tar.gz
eclipse.platform.swt-6f7e13302682818f09eae23755fc604e97a36287.tar.xz
eclipse.platform.swt-6f7e13302682818f09eae23755fc604e97a36287.zip
fixing gtk 2.2.4 and V_SCROLL not set
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java24
1 files changed, 19 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index 4b465849d4..861ea59739 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
@@ -427,7 +427,19 @@ public void removeExpandListener (ExpandListener listener) {
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
int result = super.setBounds (x, y, width, height, move, resize);
if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) {
- if (resize) setScrollbar ();
+ if (resize) {
+ if ((style & SWT.V_SCROLL) != 0) {
+ setScrollbar ();
+ } else {
+ for (int i = 0; i < itemCount; i++) {
+ ExpandItem item = items [i];
+ int newWidth = Math.max (0, getClientArea ().width - spacing * 2);
+ if (item.width != newWidth) {
+ item.setBounds (0, 0, newWidth, item.height, false, true);
+ }
+ }
+ }
+ }
}
return result;
}
@@ -499,10 +511,12 @@ public void setSpacing (int spacing) {
OS.gtk_box_set_spacing (handle, spacing);
OS.gtk_container_set_border_width (handle, spacing);
} else {
- int width = Math.max (0, getClientArea ().width - spacing * 2);
- for (int i = 0; i < itemCount; i++) {
- ExpandItem item = items[i];
- if (item.width != width) item.setBounds (0, 0, width, item.height, false, true);
+ if ((style & SWT.V_SCROLL) == 0) {
+ int width = Math.max (0, getClientArea ().width - spacing * 2);
+ for (int i = 0; i < itemCount; i++) {
+ ExpandItem item = items [i];
+ if (item.width != width) item.setBounds (0, 0, width, item.height, false, true);
+ }
}
layoutItems (0, true);
redraw ();