Commit a040ae4f authored by estade@chromium.org's avatar estade@chromium.org

ntp: adjust top padding

re-adjusted the padding above the tile grid to have a minimum of 60px rather than 100px, also it scales upwards faster as the page height increases because instead of aligning the middle of the tile grid at 1/3 from the top of the page, we align the 1/3 mark of the tile grid with the 1/3 mark of the page.

the end result is that a browser window <800px tall with 3 rows of apps and a floating bbar still will not have a scrollbar

BUG=101290
TEST=manual


Review URL: http://codereview.chromium.org/8771060

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113345 0039d316-1c4b-4281-b951-d872f2087c98
parent 53b976da
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
.tile-page-content { .tile-page-content {
overflow-y: scroll; overflow-y: scroll;
padding-top: 100px; /* This value is mirrored in TilePage.updateTopMargin_ */
padding-top: 60px;
position: relative; position: relative;
text-align: center; text-align: center;
width: 100%; width: 100%;
......
...@@ -897,9 +897,9 @@ cr.define('ntp4', function() { ...@@ -897,9 +897,9 @@ cr.define('ntp4', function() {
(this.isCurrentDragTarget && !this.withinPageDrag_ ? 1 : 0); (this.isCurrentDragTarget && !this.withinPageDrag_ ? 1 : 0);
var numRows = Math.ceil(numTiles / layout.numRowTiles); var numRows = Math.ceil(numTiles / layout.numRowTiles);
var usedHeight = layout.rowHeight * numRows; var usedHeight = layout.rowHeight * numRows;
// 100 matches the top padding of tile-page. // 60 matches the top padding of tile-page (which acts as the minimum).
var newMargin = document.documentElement.clientHeight / 3 - var newMargin = document.documentElement.clientHeight / 3 -
usedHeight / 2 - 100 - this.content_.offsetTop; usedHeight / 3 - 60;
newMargin = Math.max(newMargin, 0); newMargin = Math.max(newMargin, 0);
// |newMargin| is the final margin we actually want to show. However, // |newMargin| is the final margin we actually want to show. However,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment