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

Unified Diff: ash/frame/custom_frame_view_ash.cc

Issue 2914793005: [mus+ash] Fixes minimum browser window size (store / retrieve kPreferredSize property) (Closed)
Patch Set: [mus+ash] Fixes minimum browser window size (update kMinimumSize property in Layout()) Created 3 years, 6 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
« no previous file with comments | « no previous file | ash/public/cpp/mus_property_mirror_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/custom_frame_view_ash.cc
diff --git a/ash/frame/custom_frame_view_ash.cc b/ash/frame/custom_frame_view_ash.cc
index 7fd4fed38d908397aafc28c43f055e33474aa468..7136ec85191fa1c90ae28781890768f026e7a86c 100644
--- a/ash/frame/custom_frame_view_ash.cc
+++ b/ash/frame/custom_frame_view_ash.cc
@@ -376,9 +376,19 @@ gfx::Size CustomFrameViewAsh::GetMinimumSize() const {
return gfx::Size();
gfx::Size min_client_view_size(frame_->client_view()->GetMinimumSize());
- return gfx::Size(
+ gfx::Size min_size(
std::max(header_view_->GetMinimumWidth(), min_client_view_size.width()),
NonClientTopBorderHeight() + min_client_view_size.height());
+
+ aura::Window* frame_window = frame_->GetNativeWindow();
+ const gfx::Size* min_window_size =
+ frame_window->GetProperty(aura::client::kMinimumSize);
+ if (min_window_size) {
+ min_size =
+ gfx::Size(std::max(min_size.width(), min_window_size->width()),
+ std::max(min_size.height(), min_window_size->height()));
sadrul 2017/06/21 21:09:57 Maybe use min_size.SetToMin(...) instead.
varkha 2017/06/21 23:33:27 I take it you meant SetToMax(). Done.
+ }
+ return min_size;
}
gfx::Size CustomFrameViewAsh::GetMaximumSize() const {
« no previous file with comments | « no previous file | ash/public/cpp/mus_property_mirror_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698