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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 1802073002: Makes vertical alignment of location bar bubbles same (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Makes vertical alignment of location bar bubbles same (comments) Created 4 years, 9 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
Index: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index c9e0292c21a0376aae8330a8c73ca0bfc92b37df..e6166dcaa78a6f3cf0094e0136aa62d6aea0bab7 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -84,6 +84,10 @@ views::Widget* BookmarkBubbleView::ShowBubble(
bookmark_bubble_->SetAnchorRect(anchor_rect);
bookmark_bubble_->set_parent_window(parent_window);
}
+ // Compensate for built-in vertical padding in the anchor view's image.
+ // This is different from 5 pixel inset that is used in other cases because
+ // this bubble is using NONE as the arrow type.
+ bookmark_bubble_->set_anchor_view_insets(gfx::Insets(-1, 0));
Peter Kasting 2016/03/14 22:35:51 Do you still need to do this if you use PAINT_TRAN
varkha 2016/03/15 00:11:42 That would indeed be great and I wanted to do that
Evan Stade 2016/03/15 00:13:27 I think it should be possible and it's probably a
Peter Kasting 2016/03/15 00:34:15 Yeah, I'd like to see if this is easy enough to do
varkha 2016/03/16 03:45:30 I have tried to pursue this. I can make the Bubble
views::Widget* bubble_widget =
views::BubbleDialogDelegateView::CreateBubble(bookmark_bubble_);
bubble_widget->Show();
@@ -273,8 +277,6 @@ BookmarkBubbleView::BookmarkBubbleView(
parent_combobox_(NULL),
remove_bookmark_(false),
apply_edits_(true) {
- // Compensate for built-in vertical padding in the anchor view's image.
- set_anchor_view_insets(gfx::Insets(2, 0, 2, 0));
}
base::string16 BookmarkBubbleView::GetTitle() {

Powered by Google App Engine
This is Rietveld 408576698