[gnome-builder] omni-bar: use LTR for project/branch labels
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] omni-bar: use LTR for project/branch labels
- Date: Tue, 11 Oct 2016 20:46:11 +0000 (UTC)
commit e7207900327dd258763b58647d5f4c1b9aff4b07
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 11 13:44:20 2016 -0700
omni-bar: use LTR for project/branch labels
This fixes RTL languages where the values would be opposite
due to inheriting the parent LTR setting.
https://bugzilla.gnome.org/show_bug.cgi?id=772744
libide/workbench/ide-omni-bar.c | 4 +++
libide/workbench/ide-omni-bar.ui | 47 +++++++++++++++++++++----------------
2 files changed, 31 insertions(+), 20 deletions(-)
---
diff --git a/libide/workbench/ide-omni-bar.c b/libide/workbench/ide-omni-bar.c
index 2e79272..19b31ce 100644
--- a/libide/workbench/ide-omni-bar.c
+++ b/libide/workbench/ide-omni-bar.c
@@ -106,6 +106,7 @@ struct _IdeOmniBar
GtkLabel *branch_label;
GtkEventBox *event_box;
GtkLabel *project_label;
+ GtkBox *branch_box;
GtkLabel *build_result_mode_label;
GtkImage *build_result_diagnostics_image;
GtkButton *build_button;
@@ -641,6 +642,7 @@ ide_omni_bar_class_init (IdeOmniBarClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-omni-bar.ui");
gtk_widget_class_set_css_name (widget_class, "omnibar");
+ gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, branch_box);
gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, branch_label);
gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_button);
gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_result_diagnostics_image);
@@ -669,6 +671,8 @@ ide_omni_bar_init (IdeOmniBar *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
+ gtk_widget_set_direction (GTK_WIDGET (self->branch_box), GTK_TEXT_DIR_LTR);
+
/*
* IdeBuildManager bindings and signals.
*/
diff --git a/libide/workbench/ide-omni-bar.ui b/libide/workbench/ide-omni-bar.ui
index 64c00d6..8f36e33 100644
--- a/libide/workbench/ide-omni-bar.ui
+++ b/libide/workbench/ide-omni-bar.ui
@@ -19,27 +19,34 @@
<property name="margin-start">3</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="project_label">
- <property name="ellipsize">end</property>
- <property name="visible">true</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">/</property>
- <property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="branch_label">
- <property name="ellipsize">end</property>
+ <object class="GtkBox" id="branch_box">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
<property name="visible">true</property>
+ <child>
+ <object class="GtkLabel" id="project_label">
+ <property name="ellipsize">end</property>
+ <property name="visible">true</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">/</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="branch_label">
+ <property name="ellipsize">end</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]