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

Unified Diff: ui/views/bubble/bubble_frame_view.cc

Issue 2807243004: Fix layout of BubbleFrameView when there's only a close button in the (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 7ba6184978fd9c1610e9d93b43daf94618ea74f4..6c2255ee3d1ca9ce100744b64c3f770f4285d5da 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -257,7 +257,9 @@ gfx::Insets BubbleFrameView::GetInsets() const {
const int title_height = std::max(icon_height, label_height) + title_padding;
const int close_height =
GetWidget()->widget_delegate()->ShouldShowCloseButton()
- ? close_->height()
+ ? close_->height() +
+ 2 * ViewsDelegate::GetInstance()->GetDistanceMetric(
+ DistanceMetric::CLOSE_BUTTON_MARGIN)
Peter Kasting 2017/04/11 20:12:58 I'm wondering whether this is correct, or we only
Evan Stade 2017/04/11 20:20:16 I think whether it's 1x or 2x here defines whether
: 0;
insets += gfx::Insets(std::max(title_height, close_height), 0, 0, 0);
return insets;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698