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

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

Issue 7846006: ntp4: sprucing up bookmarks (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
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 var bookmarksPageGridValues = { 207 var bookmarksPageGridValues = {
208 // The fewest tiles we will show in a row. 208 // The fewest tiles we will show in a row.
209 minColCount: 3, 209 minColCount: 3,
210 // The most tiles we will show in a row. 210 // The most tiles we will show in a row.
211 maxColCount: 6, 211 maxColCount: 6,
212 212
213 // The smallest a tile can be. 213 // The smallest a tile can be.
214 minTileWidth: 64, 214 minTileWidth: 64,
215 // The biggest a tile can be. 215 // The biggest a tile can be.
216 maxTileWidth: 96, 216 maxTileWidth: 96,
217
218 // The padding between tiles, as a fraction of the tile width.
219 tileSpacingFraction: 1 / 2,
217 }; 220 };
218 TilePage.initGridValues(bookmarksPageGridValues); 221 TilePage.initGridValues(bookmarksPageGridValues);
219 222
220 /** 223 /**
221 * Calculates the height for a bookmarks tile for a given width. The size 224 * Calculates the height for a bookmarks tile for a given width. The size
222 * is based on a desired size of 96x72 ratio. 225 * is based on a desired size of 96x72 ratio.
223 * @return {number} The height. 226 * @return {number} The height.
224 */ 227 */
225 function heightForWidth(width) { 228 function heightForWidth(width) {
226 // The 2s are for borders, the 31 is for the title. 229 // The 2s are for borders, the 31 is for the title.
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 tile.stripeColor = color; 633 tile.stripeColor = color;
631 } 634 }
632 635
633 return { 636 return {
634 BookmarksPage: BookmarksPage, 637 BookmarksPage: BookmarksPage,
635 initBookmarkChevron: initBookmarkChevron, 638 initBookmarkChevron: initBookmarkChevron,
636 }; 639 };
637 }); 640 });
638 641
639 window.addEventListener('load', ntp4.initBookmarkChevron); 642 window.addEventListener('load', ntp4.initBookmarkChevron);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/resources/ntp4/most_visited_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698