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

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

Issue 2750063002: views: implement dialog width snapping (Closed)
Patch Set: remove stray logging Created 3 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: 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..83e4bf0ab205110d3c4085899a76d5f891d34ef0 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -531,6 +531,9 @@ gfx::Size BubbleFrameView::GetSizeForClientSize(
if (footnote_container_)
size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
+ size.set_width(
+ ViewsDelegate::GetInstance()->GetSnappedDialogWidth(size.width()));
tapted 2017/03/29 23:16:16 I like the idea of hooking in to BubbleFrameView::
Peter Kasting 2017/03/30 00:18:23 Yes, we need to know how big the title wants to be
tapted 2017/03/30 01:57:13 Most dialogs are happy using the default panel ins
Peter Kasting 2017/03/30 04:07:02 As long as GetInsets() returns the real desired in
tapted 2017/03/30 06:11:49 We may have had different ideas in our heads about
Peter Kasting 2017/03/31 22:09:58 Do all dialogs use a BubbleFrameView? They probab
tapted 2017/04/03 09:53:48 Most do.. nearly all child classes of DialogDelega
Elly Fong-Jones 2017/04/05 18:17:53 Wrapping up this thread: I ended up adding Dialog
+
return size;
}

Powered by Google App Engine
This is Rietveld 408576698