parent
6999d46539
commit
aaabd3517a
|
@ -20,6 +20,7 @@ namespace Tooth {
|
|||
public static ImageCache image_cache;
|
||||
|
||||
public static GLib.Regex rtl_regex;
|
||||
public static bool is_rtl;
|
||||
|
||||
public static bool start_hidden = false;
|
||||
|
||||
|
@ -147,8 +148,10 @@ namespace Tooth {
|
|||
}
|
||||
else {
|
||||
message ("Presenting MainWindow");
|
||||
if (main_window == null)
|
||||
if (main_window == null) {
|
||||
main_window = new Dialogs.MainWindow (this);
|
||||
is_rtl = main_window.get_default_direction() == Gtk.TextDirection.RTL;
|
||||
}
|
||||
main_window.present ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,9 @@ public class Tooth.Widgets.RichLabel : Adw.Bin {
|
|||
widget.set_label (text);
|
||||
var rtl = rtl_regex.match(text);
|
||||
if (rtl) {
|
||||
xalign = 1;
|
||||
xalign = is_rtl ? 0 : 1;
|
||||
} else {
|
||||
xalign = is_rtl ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue