Chromium Code Reviews

Unified Diff: chrome/browser/gtk/bookmark_bar_gtk.cc

Issue 218037: GTK: Fix overflow chevron for RTL locales. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.cc
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk.cc (revision 26890)
+++ chrome/browser/gtk/bookmark_bar_gtk.cc (working copy)
@@ -466,11 +466,18 @@
gtk_container_get_children(GTK_CONTAINER(bookmark_toolbar_.get()));
for (GList* iter = toolbar_items; iter; iter = g_list_next(iter)) {
GtkWidget* tool_item = reinterpret_cast<GtkWidget*>(iter->data);
- if (tool_item->allocation.x + tool_item->allocation.width >
- bookmark_toolbar_.get()->allocation.width + extra_space) {
- overflow = true;
+ if (gtk_widget_get_direction(tool_item) == GTK_TEXT_DIR_RTL) {
+ overflow = (tool_item->allocation.x <
+ bookmark_toolbar_.get()->allocation.x - extra_space);
Evan Martin 2009/09/24 21:12:05 It's confusing to me what origins these allocation
Evan Stade 2009/09/24 21:15:42 they are relative to the parent GdkWindow that the
+ } else {
+ overflow =
+ (tool_item->allocation.x + tool_item->allocation.width >
+ bookmark_toolbar_.get()->allocation.width +
+ bookmark_toolbar_.get()->allocation.x + extra_space);
+ }
+ if (overflow)
break;
- }
+
if (showing_folders &&
model_->GetBookmarkBarNode()->GetChild(rv)->is_folder()) {
showing_folders->push_back(gtk_bin_get_child(GTK_BIN(tool_item)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine