diff options
author | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 01:29:53 +0000 |
---|---|---|
committer | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 01:29:53 +0000 |
commit | 58bf86404acb1f5976f38ece94174c0ec3f0c1fa (patch) | |
tree | bb91c537b1daf808e4e0c6410494ef6aa871c05f /chrome | |
parent | d22935f1a195ec87e16043fe054bdef99cda783a (diff) | |
download | chromium_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')
-rw-r--r-- | chrome/browser/resources/new_new_tab.css | 20 | ||||
-rw-r--r-- | chrome/browser/resources/new_new_tab.html | 6 | ||||
-rw-r--r-- | chrome/browser/resources/new_new_tab.js | 6 | ||||
-rw-r--r-- | chrome/browser/window_sizer.cc | 8 | ||||
-rw-r--r-- | chrome/browser/window_sizer_unittest.cc | 4 |
5 files changed, 23 insertions, 21 deletions
diff --git a/chrome/browser/resources/new_new_tab.css b/chrome/browser/resources/new_new_tab.css index a2a38b3..a81e6b8 100644 --- a/chrome/browser/resources/new_new_tab.css +++ b/chrome/browser/resources/new_new_tab.css @@ -11,7 +11,7 @@ body { background: url(chrome://theme/product_logo) no-repeat 0 8px; position: relative; margin: 0 auto; - width: 940px; + width: 920px; -webkit-transition: width .15s; } @@ -32,7 +32,7 @@ html[anim='false'] *, position: relative; padding: 0; margin-bottom: 34px; - height: 372px; + height: 366px; -webkit-user-select: none; -webkit-transition: height .15s, opacity .15s; } @@ -57,8 +57,8 @@ html[anim='false'] *, .thumbnail, .thumbnail-container > .title { - width: 212px; /* natural size is 196 */ - height: 132px; /* 136 */ + width: 207px; /* natural size is 196 */ + height: 129px; /* 136 */ -webkit-transition: width .15s, height .15s; } @@ -529,7 +529,7 @@ html[dir='rtl'] #view-toolbar { #lower-sections > .section { -webkit-transition: width .15s, opacity .15s, left .15s; -webkit-box-sizing: border-box; - width: 460px; /* Set default size so we don't have to do a js layout at + width: 450px; /* Set default size so we don't have to do a js layout at load */ } @@ -639,24 +639,24 @@ html[dir='rtl'] #option-menu { } #t1, #t5 { - left: 240px; + left: 235px; } #t2, #t6 { - left: 480px; + left: 470px; } #t3, #t7 { - left: 720px; + left: 705px; } #t4, #t5, #t6, #t7 { - top: 186px; + top: 183px; } /* small */ -@media (max-width: 940px) { +@media (max-width: 920px) { #main { width: 692px; diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html index e13cc8b..cb984ec 100644 --- a/chrome/browser/resources/new_new_tab.html +++ b/chrome/browser/resources/new_new_tab.html @@ -241,11 +241,11 @@ logEvent('log start'); <a class="item" jsdisplay="type == 'download'" jsvalues="href:file_path;title:url; - .style.backgroundImage: - 'url(chrome://theme/downloads_favicon)'; dir:direction; .fileId:id" - jscontent="file_name"></a> + jscontent="file_name" + style="background-image: + url(chrome://theme/downloads_favicon)"></a> </div> <a href="chrome://history/" class="item nav" i18n-content="viewfullhistory"></a> diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index 0890d10..aa1a78e 100644 --- a/chrome/browser/resources/new_new_tab.js +++ b/chrome/browser/resources/new_new_tab.js @@ -265,7 +265,7 @@ function chromeSend(name, params, callbackName, callback) { } function useSmallGrid() { - return window.innerWidth <= 940; + return window.innerWidth <= 920; } var LayoutMode = { @@ -528,8 +528,8 @@ var mostVisited = { var marginWidth = 10; var marginHeight = 7; var borderWidth = 4; - var thumbWidth = small ? 150 : 212; - var thumbHeight = small ? 93 : 132; + var thumbWidth = small ? 150 : 207; + var thumbHeight = small ? 93 : 129; var w = thumbWidth + 2 * borderWidth + 2 * marginWidth; var h = thumbHeight + 40 + 2 * marginHeight; var sumWidth = cols * w - 2 * marginWidth; 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(), diff --git a/chrome/browser/window_sizer_unittest.cc b/chrome/browser/window_sizer_unittest.cc index 36e9257..c58b31a 100644 --- a/chrome/browser/window_sizer_unittest.cc +++ b/chrome/browser/window_sizer_unittest.cc @@ -263,7 +263,7 @@ TEST(WindowSizerTest, DefaultSizeCase) { false, DEFAULT, &window_bounds, &maximized); EXPECT_FALSE(maximized); EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, - 840 - kWindowTilePixels * 3, + 840 - static_cast<int>(kWindowTilePixels * 1.5), 1050 - kWindowTilePixels * 2), window_bounds); } @@ -275,7 +275,7 @@ TEST(WindowSizerTest, DefaultSizeCase) { false, DEFAULT, &window_bounds, &maximized); EXPECT_FALSE(maximized); EXPECT_EQ(gfx::Rect(kWindowTilePixels, kWindowTilePixels, - 960 - kWindowTilePixels * 3, + 960 - static_cast<int>(kWindowTilePixels * 1.5), 1200 - kWindowTilePixels * 2), window_bounds); } |