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

Side by Side Diff: chrome/browser/resources/ntp4/bookmarks_page.js

Issue 7840004: [ntp4] Make bookmark tiles smaller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('ntp4', function() { 5 cr.define('ntp4', function() {
6 'use strict'; 6 'use strict';
7 7
8 var localStrings = new LocalStrings; 8 var localStrings = new LocalStrings;
9 9
10 /** 10 /**
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 var TilePage = ntp4.TilePage; 197 var TilePage = ntp4.TilePage;
198 198
199 var bookmarksPageGridValues = { 199 var bookmarksPageGridValues = {
200 // The fewest tiles we will show in a row. 200 // The fewest tiles we will show in a row.
201 minColCount: 3, 201 minColCount: 3,
202 // The most tiles we will show in a row. 202 // The most tiles we will show in a row.
203 maxColCount: 6, 203 maxColCount: 6,
204 204
205 // The smallest a tile can be. 205 // The smallest a tile can be.
206 minTileWidth: 150, 206 minTileWidth: 64,
207 // The biggest a tile can be. 207 // The biggest a tile can be.
208 maxTileWidth: 150, 208 maxTileWidth: 96,
209 }; 209 };
210 TilePage.initGridValues(bookmarksPageGridValues); 210 TilePage.initGridValues(bookmarksPageGridValues);
211 211
212 /** 212 /**
213 * Calculates the height for a bookmarks tile for a given width. The size 213 * Calculates the height for a bookmarks tile for a given width. The size
214 * is based on a desired size of 96x72 ratio. 214 * is based on a desired size of 96x72 ratio.
215 * @return {number} The height. 215 * @return {number} The height.
216 */ 216 */
217 function heightForWidth(width) { 217 function heightForWidth(width) {
218 // The 2s are for borders, the 31 is for the title. 218 // The 2s are for borders, the 31 is for the title.
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 tile.stripeColor = color; 593 tile.stripeColor = color;
594 } 594 }
595 595
596 return { 596 return {
597 BookmarksPage: BookmarksPage, 597 BookmarksPage: BookmarksPage,
598 initBookmarkChevron: initBookmarkChevron, 598 initBookmarkChevron: initBookmarkChevron,
599 }; 599 };
600 }); 600 });
601 601
602 window.addEventListener('load', ntp4.initBookmarkChevron); 602 window.addEventListener('load', ntp4.initBookmarkChevron);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698