Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2010-12-17 21:48:04 +0000
committerFelipe Heidrich2010-12-17 21:48:04 +0000
commit1c8d6d064e4a8a70316f776a21806c7dda140423 (patch)
treea013b3317233078ea393b78e85ad02a9fd262ac2 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
parentd8c7ac1c238569192a4106f29243a448a4e0192d (diff)
downloadeclipse.platform.swt-1c8d6d064e4a8a70316f776a21806c7dda140423.tar.gz
eclipse.platform.swt-1c8d6d064e4a8a70316f776a21806c7dda140423.tar.xz
eclipse.platform.swt-1c8d6d064e4a8a70316f776a21806c7dda140423.zip
Bug 29779 - BIDI: lack of ability to change orientation of widget in runtime [no public methods yet]
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 6495b79f72..4d05731acb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -148,7 +148,6 @@ void createHandle(int index) {
OS.gtk_fixed_set_has_window (handle, true);
OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
layout = new TextLayout (display);
- layout.setOrientation((style & SWT.RIGHT_TO_LEFT) != 0? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT);
linkColor = new Color (display, LINK_FOREGROUND);
disabledColor = new Color (display, LINK_DISABLED_FOREGROUND);
offsets = new Point [0];
@@ -699,6 +698,12 @@ void setFontDescription (int /*long*/ font) {
layout.setFont (Font.gtk_new (display, font));
}
+void setOrientation (boolean create) {
+ super.setOrientation (create);
+ layout.setOrientation (style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
+ if (!create) redraw (true);
+}
+
/**
* Sets the receiver's text.
* <p>

Back to the top