[gbrainy] RTL support for SimpleLabel



commit bdb81653f136c11dcfc220285ae1a9c2186e0445
Author: Jordi Mas <jmas softcatala org>
Date:   Fri Aug 21 19:48:31 2009 +0200

    RTL support for SimpleLabel

 src/SimpleLabel.cs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/SimpleLabel.cs b/src/SimpleLabel.cs
index ca38b86..7fd2255 100644
--- a/src/SimpleLabel.cs
+++ b/src/SimpleLabel.cs
@@ -77,6 +77,11 @@ public class SimpleLabel : DrawingArea
 
 			using (Pango.Layout layout = new Pango.Layout (this.PangoContext))
 			{
+				if (Direction == Gtk.TextDirection.Rtl)
+					layout.Alignment = Pango.Alignment.Right;					
+				else
+					layout.Alignment = Pango.Alignment.Left;
+				
 				layout.Width = (winWidth - width_margin * 2) * (int) Pango.Scale.PangoScale;
 				layout.SetMarkup (text);
 				args.Window.DrawLayout (light, width_margin, height_margin, layout);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]