OLD | NEW |
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 Loading... |
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 Loading... |
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); |
OLD | NEW |