summaryrefslogtreecommitdiffstats
path: root/chrome/browser/window_sizer.cc
diff options
context:
space:
mode:
authorarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 01:29:53 +0000
committerarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 01:29:53 +0000
commit58bf86404acb1f5976f38ece94174c0ec3f0c1fa (patch)
treebb91c537b1daf808e4e0c6410494ef6aa871c05f /chrome/browser/window_sizer.cc
parentd22935f1a195ec87e16043fe054bdef99cda783a (diff)
downloadchromium_src-58bf86404acb1f5976f38ece94174c0ec3f0c1fa.zip
chromium_src-58bf86404acb1f5976f38ece94174c0ec3f0c1fa.tar.gz
chromium_src-58bf86404acb1f5976f38ece94174c0ec3f0c1fa.tar.bz2
Tweak thumbnail sizes a bit so it the NNTP looks better side by side on
a 1920x1200 screen. Also, tweak the default size of new windows slightly. In case we decide to use side by side windows size the window in such a way that 2 windows fit on the screen and have the kWindowTilePixels spacing between each other and the screen edges. BUG=None TEST=Show two windows side. On a 1920x1200 screen they should both be showing the thumbnails in normal size. Review URL: http://codereview.chromium.org/155930 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/window_sizer.cc')
-rw-r--r--chrome/browser/window_sizer.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/window_sizer.cc b/chrome/browser/window_sizer.cc
index 897549e..1d9c6a3 100644
--- a/chrome/browser/window_sizer.cc
+++ b/chrome/browser/window_sizer.cc
@@ -189,9 +189,11 @@ void WindowSizer::GetDefaultWindowBounds(gfx::Rect* default_bounds) const {
// computer display.
if (((width_to_height * 10) >= 16) &&
work_area.width() > kMinScreenWidthForWindowHalving) {
- // Halve the work area, subtracting aesthetic padding on either side, plus
- // some more aesthetic padding for spacing between windows.
- default_width = (work_area.width() / 2) - 3 * kWindowTilePixels;
+ // Halve the work area, subtracting aesthetic padding on either side.
+ // The padding is set so that two windows, side by side have
+ // kWindowTilePixels between screen edge and each other.
+ default_width = static_cast<int>(work_area.width() / 2. -
+ 1.5 * kWindowTilePixels);
}
default_bounds->SetRect(kWindowTilePixels + work_area.x(),
kWindowTilePixels + work_area.y(),