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

Unified Diff: ui/views/window/dialog_delegate.cc

Issue 2880433002: views: don't snap dialogs with no buttons (Closed)
Patch Set: add unittest Created 3 years, 7 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/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_delegate.cc
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index d354353c5db90c32b7bd1c53d52e5c4e3b7d99d3..d0a13e0090dfd7eff2e9a9b0a077bb7e01dbfc5d 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -133,7 +133,7 @@ void DialogDelegate::UpdateButton(LabelButton* button, ui::DialogButton type) {
}
bool DialogDelegate::ShouldSnapFrameWidth() const {
- return true;
+ return GetDialogButtons() != ui::DIALOG_BUTTON_NONE;
sky 2017/05/12 17:28:07 Would a better fix be to have BubbleDialogDelegate
}
int DialogDelegate::GetDialogButtons() const {
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698