Index: ui/views/examples/dialog_example.cc |
diff --git a/ui/views/examples/dialog_example.cc b/ui/views/examples/dialog_example.cc |
index 637c6dafabb1957002431d3e709998ed9e4c4af4..d9af9a4db6959db528a3e1dfb5d8e30ad97e5815 100644 |
--- a/ui/views/examples/dialog_example.cc |
+++ b/ui/views/examples/dialog_example.cc |
@@ -245,6 +245,10 @@ void DialogExample::ResizeDialog() { |
// Q: Do we need NonClientFrameView::GetWindowBoundsForClientBounds() here? |
// A: When DialogCientView properly feeds back sizes, we do not. |
widget->SetBoundsConstrained(preferred_bounds); |
+ |
+ // For user-resizable dialogs, ensure the window manager enforces any new |
+ // minimum size. |
+ widget->OnSizeConstraintsChanged(); |
} |
void DialogExample::ButtonPressed(Button* sender, const ui::Event& event) { |
@@ -266,6 +270,7 @@ void DialogExample::ButtonPressed(Button* sender, const ui::Event& event) { |
DialogDelegate::CreateDialogWidget( |
dialog, container()->GetWidget()->GetNativeWindow(), parent); |
+ ResizeDialog(); |
Peter Kasting
2017/02/25 06:04:07
I'm vaguely surprised this is necessary, and doesn
tapted
2017/02/27 10:04:19
Well this was fun to trace :/. It boils down to a
|
} |
last_dialog_->GetWidget()->Show(); |
return; |