[gnome-sound-recorder/bilelmoussaoui/misc: 4/4] row: handle RTL correctly
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/bilelmoussaoui/misc: 4/4] row: handle RTL correctly
- Date: Sun, 16 Aug 2020 15:02:44 +0000 (UTC)
commit 05243b68a4df6392acdf7a48a4c7f1738626043c
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Sun Aug 16 17:01:54 2020 +0200
row: handle RTL correctly
data/ui/row.ui | 75 ++++++++++++++++++++++++++--------------------------------
src/row.js | 4 ++++
2 files changed, 37 insertions(+), 42 deletions(-)
---
diff --git a/data/ui/row.ui b/data/ui/row.ui
index 0232737..9763d1f 100644
--- a/data/ui/row.ui
+++ b/data/ui/row.ui
@@ -22,67 +22,58 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="margin_left">12</property>
+ <property name="margin_right">12</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkLabel" id="duration">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">center</property>
- <property name="margin_left">12</property>
- <property name="hexpand">True</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="duration">
+ <object class="GtkLabel" id="name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin_right">12</property>
+ <property name="ellipsize">end</property>
+ <property name="single_line_mode">True</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="title"/>
+ </style>
</object>
<packing>
- <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkBox">
+ <object class="GtkLabel" id="date">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="ellipsize">end</property>
- <property name="single_line_mode">True</property>
- <property name="xalign">0</property>
- <style>
- <class name="title"/>
- </style>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="date">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">4</property>
- <property name="xalign">0</property>
- <style>
- <class name="subtitle"/>
- </style>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="margin_top">4</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="subtitle"/>
+ </style>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -113,7 +104,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkBox" id="optionBox">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
@@ -157,6 +148,7 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">8</property>
<child>
<object class="GtkButton" id="exportBtn">
<property name="visible">True</property>
@@ -188,7 +180,6 @@
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="halign">center</property>
- <property name="margin_left">8</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Rename</property>
<property name="action_name">recording.rename</property>
diff --git a/src/row.js b/src/row.js
index 9e64ad3..e5ae454 100644
--- a/src/row.js
+++ b/src/row.js
@@ -109,7 +109,11 @@ var Row = GObject.registerClass({
this._waveformStack.visible_child_name = 'loading';
});
+ // Force LTR, we don't want forward/play/backward
+ this._playbackControls.set_direction(Gtk.TextDirection.LTR);
+ // Force LTR, we don't want reverse hh:mm::ss
+ this._duration.set_direction(Gtk.TextDirection.LTR);
this._duration.label = formatTime(recording.duration / Gst.SECOND);
recording.connect('notify::duration', () => {
this._duration.label = formatTime(recording.duration / Gst.SECOND);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]