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

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

Issue 2932523003: Fix Harmony popover buttons being flush with their content. (Closed)
Patch Set: fix merge Created 3 years, 6 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/ui/views/harmony/harmony_layout_provider.cc ('k') | ui/views/layout/layout_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index b8be537b9912cb78562f726d0e441f52bab0c8e4..502bc0b8a2a032fff9af4d84790b0b4f0dd3195e 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -98,7 +98,11 @@ bool BubbleDialogDelegateView::ShouldShowCloseButton() const {
ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) {
DialogClientView* client = new DialogClientView(widget, GetContentsView());
- client->SetButtonRowInsets(gfx::Insets());
+ LayoutProvider* provider = LayoutProvider::Get();
+ // The other three sides are taken care of by the |margins_| given to
+ // BubbleFrameView in CreateNonClientFrameView().
+ client->SetButtonRowInsets(gfx::Insets(
+ provider->GetDistanceMetric(DISTANCE_BUBBLE_BUTTON_TOP_MARGIN), 0, 0, 0));
widget->non_client_view()->set_mirror_client_in_rtl(mirror_arrow_in_rtl_);
return client;
}
« no previous file with comments | « chrome/browser/ui/views/harmony/harmony_layout_provider.cc ('k') | ui/views/layout/layout_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698