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

Unified Diff: chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc

Issue 405323002: [Win Aero] Correctly set the minimum window size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 4 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
Index: chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc
diff --git a/chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc b/chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc
index ee2fe5a95cdaa283d55862aa499e25ab6e7e30c6..34cc0a31bba07d5ba01b26bf2eeb0cc8c6f044fb 100644
--- a/chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc
+++ b/chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc
@@ -56,6 +56,10 @@ gfx::Rect GlassAppWindowFrameViewWin::GetBoundsForClientView() const {
gfx::Rect GlassAppWindowFrameViewWin::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const {
gfx::Insets insets = GetGlassInsets();
+ // Our bounds are not the same as the window's due to the offset added by
+ // AppWindowDesktopWindowTreeHostWin::GetClientAreaInsets. So account for it
+ // here.
+ insets += gfx::Insets(0, 0, 1, 1);
return gfx::Rect(client_bounds.x() - insets.left(),
client_bounds.y() - insets.top(),
client_bounds.width() + insets.left() + insets.right(),
@@ -114,8 +118,10 @@ const char* GlassAppWindowFrameViewWin::GetClassName() const {
gfx::Size GlassAppWindowFrameViewWin::GetMinimumSize() const {
gfx::Size min_size = widget_->client_view()->GetMinimumSize();
+
gfx::Rect client_bounds = GetBoundsForClientView();
- min_size.Enlarge(0, client_bounds.y());
+ min_size.Enlarge(width() - client_bounds.width(),
+ height() - client_bounds.height());
return min_size;
}

Powered by Google App Engine
This is Rietveld 408576698