Chromium Code Reviews| Index: chrome/browser/ui/views/harmony/chrome_layout_provider.cc |
| diff --git a/chrome/browser/ui/views/harmony/chrome_layout_provider.cc b/chrome/browser/ui/views/harmony/chrome_layout_provider.cc |
| index 24988010ce0f122ed1c04a529801ffd396c6bf50..758c694f5cff214b00e9bdb8d6de8e7196fd70bb 100644 |
| --- a/chrome/browser/ui/views/harmony/chrome_layout_provider.cc |
| +++ b/chrome/browser/ui/views/harmony/chrome_layout_provider.cc |
| @@ -77,3 +77,12 @@ bool ChromeLayoutProvider::ShouldShowWindowIcon() const { |
| bool ChromeLayoutProvider::IsHarmonyMode() const { |
| return false; |
| } |
| + |
| +int ChromeLayoutProvider::GetSnappedDialogWidth(int min_width) const { |
| + // 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. |
|
Peter Kasting
2017/05/26 23:59:10
Nit: Dunno whether you want to say "we could try t
Elly Fong-Jones
2017/05/30 14:55:36
Done.
|
| + return min_width < 320 ? 320 : min_width; |
|
Peter Kasting
2017/05/26 23:59:10
Nit: Simpler:
return std::max(min_width, 320);
Elly Fong-Jones
2017/05/30 14:55:36
Done.
|
| +} |