OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/bubble/bubble_frame_view.h" | 5 #include "ui/views/bubble/bubble_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
524 title_bar_width += close_->width() + 1; | 524 title_bar_width += close_->width() + 1; |
525 | 525 |
526 gfx::Size size(client_size); | 526 gfx::Size size(client_size); |
527 gfx::Insets client_insets = GetInsets(); | 527 gfx::Insets client_insets = GetInsets(); |
528 size.Enlarge(client_insets.width(), client_insets.height()); | 528 size.Enlarge(client_insets.width(), client_insets.height()); |
529 size.SetToMax(gfx::Size(title_bar_width, 0)); | 529 size.SetToMax(gfx::Size(title_bar_width, 0)); |
530 | 530 |
531 if (footnote_container_) | 531 if (footnote_container_) |
532 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); | 532 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); |
533 | 533 |
534 size.set_width( | |
535 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
| |
536 | |
534 return size; | 537 return size; |
535 } | 538 } |
536 | 539 |
537 } // namespace views | 540 } // namespace views |
OLD | NEW |