| Index: ui/views/layout/layout_provider.cc
|
| diff --git a/ui/views/layout/layout_provider.cc b/ui/views/layout/layout_provider.cc
|
| index af62c005255cbf51975f2d78b572af068c766cec..11412ca33f5a4560f8b9807add62831ba8d7f3ba 100644
|
| --- a/ui/views/layout/layout_provider.cc
|
| +++ b/ui/views/layout/layout_provider.cc
|
| @@ -104,7 +104,13 @@ const TypographyProvider& LayoutProvider::GetTypographyProvider() const {
|
| }
|
|
|
| int LayoutProvider::GetSnappedDialogWidth(int min_width) const {
|
| - return min_width;
|
| + // This is an arbitrary value, but it's a good arbitrary value. Some dialogs
|
| + // have very small widths for their contents views, which causes ugly
|
| + // title-wrapping where a two-word title is split across multiple lines or
|
| + // similar. To prevent that, forbid any snappable dialog from being narrower
|
| + // than this value. In principle it's possible to factor in the title width
|
| + // here, but it is not really worth the complexity.
|
| + return std::max(min_width, 320);
|
| }
|
|
|
| } // namespace views
|
|
|