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

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

Issue 11756005: Implement rough new dialog style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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 | « ui/native_theme/native_theme_win.cc ('k') | ui/views/controls/button/label_button.h » ('j') | 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 03237380abb0006beccac0b96929e24746e081a2..d3f608a286b01d9631b5c0d1161934f4e04e2a48 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -49,11 +49,10 @@ BubbleFrameView::BubbleFrameView(const gfx::Insets& margins,
BubbleFrameView::~BubbleFrameView() {}
gfx::Rect BubbleFrameView::GetBoundsForClientView() const {
- gfx::Insets margin = bubble_border()->GetInsets();
- margin += content_margins();
- return gfx::Rect(margin.left(), margin.top(),
- std::max(width() - margin.width(), 0),
- std::max(height() - margin.height(), 0));
+ gfx::Rect client_bounds = GetLocalBounds();
+ client_bounds.Inset(border()->GetInsets());
+ client_bounds.Inset(content_margins());
+ return client_bounds;
}
gfx::Rect BubbleFrameView::GetWindowBoundsForClientBounds(
« no previous file with comments | « ui/native_theme/native_theme_win.cc ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698