diff options
Diffstat (limited to 'chrome/common/gtk_util.cc')
-rw-r--r-- | chrome/common/gtk_util.cc | 9 |
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 |