Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/Conversion.cs')
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/Conversion.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/Conversion.cs b/Xwt.Gtk/Xwt.GtkBackend/Conversion.cs
index c576ae03..954688b4 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/Conversion.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/Conversion.cs
@@ -176,6 +176,16 @@ namespace Xwt.GtkBackend
}
throw new InvalidOperationException("Invalid TreeViewGridLines value: " + value);
}
+
+ public static float ToGtkAlignment(this Alignment alignment)
+ {
+ switch(alignment) {
+ case Alignment.Start: return 0.0f;
+ case Alignment.Center: return 0.5f;
+ case Alignment.End: return 1.0f;
+ }
+ throw new InvalidOperationException("Invalid alignment value: " + alignment);
+ }
}
}