Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

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

Issue 332022: GTK: Fix browser action bubble arrow positions. (Closed)
Patch Set: update comment Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/bookmark_bubble_gtk.cc ('k') | chrome/browser/gtk/first_run_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/extension_popup_gtk.cc
diff --git a/chrome/browser/gtk/extension_popup_gtk.cc b/chrome/browser/gtk/extension_popup_gtk.cc
index 7f2a913569f3692b07973d30bb787a4e16f6c312..180f8e2da6a3d9cd8cf3385388974e666c825c60 100644
--- a/chrome/browser/gtk/extension_popup_gtk.cc
+++ b/chrome/browser/gtk/extension_popup_gtk.cc
@@ -6,6 +6,7 @@
#include <gtk/gtk.h>
+#include "app/l10n_util.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/profile.h"
@@ -60,8 +61,17 @@ void ExtensionPopupGtk::ShowPopup() {
return;
}
+ // We'll be in the upper-right corner of the window for LTR languages, so we
+ // want to put the arrow at the upper-right corner of the bubble to match the
+ // page and app menus.
+ InfoBubbleGtk::ArrowLocationGtk arrow_location =
+ (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) ?
+ InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT :
+ InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT;
bubble_ = InfoBubbleGtk::Show(browser_->window()->GetNativeHandle(),
- relative_to_, host_->view()->native_view(),
+ relative_to_,
+ host_->view()->native_view(),
+ arrow_location,
GtkThemeProvider::GetFrom(browser_->profile()),
this);
}
« no previous file with comments | « chrome/browser/gtk/bookmark_bubble_gtk.cc ('k') | chrome/browser/gtk/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698