diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 17:24:49 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 17:24:49 +0000 |
commit | 5f46418438b0cd2570318fdcf03bb2e1e7855d9e (patch) | |
tree | eebcfc8997a36c08fbc72a11d8d5bddb97578aea /chrome/views/window/non_client_view.cc | |
parent | fc6536ff4a94bccc3df5c821922bdb4603283fd1 (diff) | |
download | chromium_src-5f46418438b0cd2570318fdcf03bb2e1e7855d9e.zip chromium_src-5f46418438b0cd2570318fdcf03bb2e1e7855d9e.tar.gz chromium_src-5f46418438b0cd2570318fdcf03bb2e1e7855d9e.tar.bz2 |
Don't allow the browser window to be resized so small that layout starts breaking horribly. When it _is_ small, draw the frame correctly.
This is an incomplete fix; only non-Aero main/popup/app windows are handled so far, but this was becoming hairy enough I wanted to checkpoint it.
BUG=9885
Review URL: http://codereview.chromium.org/100005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14618 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/window/non_client_view.cc')
-rw-r--r-- | chrome/views/window/non_client_view.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/views/window/non_client_view.cc b/chrome/views/window/non_client_view.cc index bc69587..29daf06 100644 --- a/chrome/views/window/non_client_view.cc +++ b/chrome/views/window/non_client_view.cc @@ -131,10 +131,17 @@ void NonClientView::LayoutFrameView() { // NonClientView, View overrides: gfx::Size NonClientView::GetPreferredSize() { + // TODO(pkasting): This should probably be made to look similar to + // GetMinimumSize() below. This will require implementing GetPreferredSize() + // better in the various frame views. gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); return GetWindowBoundsForClientBounds(client_bounds).size(); } +gfx::Size NonClientView::GetMinimumSize() { + return frame_view_->GetMinimumSize(); +} + void NonClientView::Layout() { LayoutFrameView(); |