[gnome-clocks/bilelmoussaoui/timer-ltr: 1/2] timer: force LTR on the setup grid
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussaoui/timer-ltr: 1/2] timer: force LTR on the setup grid
- Date: Thu, 11 Feb 2021 15:58:07 +0000 (UTC)
commit 7a10667b6dc9053e135185c6651aa123baa08f06
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu Feb 11 16:49:44 2021 +0100
timer: force LTR on the setup grid
data/ui/timer-setup.ui | 2 +-
src/timer-row.vala | 2 +-
src/timer-setup.vala | 5 +++++
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/timer-setup.ui b/data/ui/timer-setup.ui
index 08a8fb1..8a2f3b1 100644
--- a/data/ui/timer-setup.ui
+++ b/data/ui/timer-setup.ui
@@ -200,7 +200,7 @@
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkGrid" id="time_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
diff --git a/src/timer-row.vala b/src/timer-row.vala
index eab462d..bec09e7 100644
--- a/src/timer-row.vala
+++ b/src/timer-row.vala
@@ -67,7 +67,7 @@ public class Row : Gtk.ListBoxRow {
public Row (Item item) {
Object (item: item);
-
+
// Force LTR since we do not want to reverse [hh] : [mm] : [ss]
countdown_label.set_direction (Gtk.TextDirection.LTR);
diff --git a/src/timer-setup.vala b/src/timer-setup.vala
index 651f405..69129f9 100644
--- a/src/timer-setup.vala
+++ b/src/timer-setup.vala
@@ -30,6 +30,9 @@ public class Setup : Gtk.Box {
[GtkChild]
private unowned Gtk.SpinButton s_spinbutton;
+ [GtkChild]
+ private unowned Gtk.Grid time_grid;
+
public Setup () {
var actions = new SimpleActionGroup ();
// The duration here represends a number of minutes
@@ -44,6 +47,8 @@ public class Setup : Gtk.Box {
});
actions.add_action (set_duration_action);
insert_action_group ("timer-setup", actions);
+
+ time_grid.set_direction (Gtk.TextDirection.LTR);
}
private int get_duration () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]