summaryrefslogtreecommitdiffstats
path: root/chrome/common/gtk_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/gtk_util.cc')
-rw-r--r--chrome/common/gtk_util.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
index 0ff6111..46518ca 100644
--- a/chrome/common/gtk_util.cc
+++ b/chrome/common/gtk_util.cc
@@ -286,4 +286,13 @@ bool WidgetContainsCursor(GtkWidget* widget) {
return widget_allocation.Contains(x, y);
}
+void BoxPackWidgetWithDirection(GtkBox* parent, GtkWidget* widget,
+ guint expand, guint fill, guint padding) {
+ if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ gtk_box_pack_end(parent, widget, expand, fill, padding);
+ } else {
+ gtk_box_pack_start(parent, widget, expand, fill, padding);
+ }
+}
+
} // namespace gtk_util