diff dwt/widgets/TreeColumn.d @ 240:ce446666f5a2

Update to SWT 3.4M7
author Frank Benoit <benoit@tionex.de>
date Mon, 12 May 2008 19:13:01 +0200
parents 380bad9f6852
children 34409a2fc053
line wrap: on
line diff
--- a/dwt/widgets/TreeColumn.d	Mon May 12 15:36:37 2008 +0200
+++ b/dwt/widgets/TreeColumn.d	Mon May 12 19:13:01 2008 +0200
@@ -202,6 +202,7 @@
 
 void createWidget (int index) {
     parent.createItem (this, index);
+    setOrientation ();
     hookEvents ();
     register ();
     text = "";
@@ -426,7 +427,7 @@
         GtkTreeIter iter;
         if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, &iter)) {
             do {
-                width = Math.max (width, parent.calculateWidth (cast(GtkTreeViewColumn*)handle, &iter));
+                width = Math.max (width, parent.calculateWidth (cast(GtkTreeViewColumn*)handle, &iter, true));
             } while (OS.gtk_tree_model_iter_next(parent.modelHandle, &iter));
         }
     }
@@ -576,6 +577,15 @@
     OS.gtk_tree_view_column_set_reorderable (handle, moveable);
 }
 
+void setOrientation() {
+    if ((parent.style & DWT.RIGHT_TO_LEFT) !is 0) {
+        if (buttonHandle !is null) {
+            OS.gtk_widget_set_direction (buttonHandle, OS.GTK_TEXT_DIR_RTL);
+            display.doSetDirectionProc(buttonHandle, OS.GTK_TEXT_DIR_RTL);
+        }
+    }
+}
+
 /**
  * Sets the resizable attribute.  A column that is
  * not resizable cannot be dragged by the user but