diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 02:35:30 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 02:35:30 +0000 |
commit | a8b1bc7935276f4c004ac4cffefa50f45a47c9ed (patch) | |
tree | 4a5a617e4913075619dbf834e4a657c2514ed54e /chrome/browser/gtk/bookmark_bar_gtk.cc | |
parent | 81f808de3c7dafaf9f0c304e022f70621c4fb8f6 (diff) | |
download | chromium_src-a8b1bc7935276f4c004ac4cffefa50f45a47c9ed.zip chromium_src-a8b1bc7935276f4c004ac4cffefa50f45a47c9ed.tar.gz chromium_src-a8b1bc7935276f4c004ac4cffefa50f45a47c9ed.tar.bz2 |
GTK: Fix overflow chevron for RTL locales.
BUG=22872
Review URL: http://codereview.chromium.org/218037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bar_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index a6f82b0..a2c3791 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -466,11 +466,18 @@ int BookmarkBarGtk::GetFirstHiddenBookmark( 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; - break; + if (gtk_widget_get_direction(tool_item) == GTK_TEXT_DIR_RTL) { + overflow = (tool_item->allocation.x < + bookmark_toolbar_.get()->allocation.x - extra_space); + } 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))); |