OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 /** | 5 /** |
6 * Aspect ratio of keyboard. | 6 * Aspect ratio of keyboard. |
7 * @type {number} | 7 * @type {number} |
8 */ | 8 */ |
9 var ASPECT_RATIO = 4.5; | 9 var ASPECT_RATIO = 3.5; |
10 | 10 |
11 var RowAlignment = { | 11 var RowAlignment = { |
12 STRETCH: "stretch", | 12 STRETCH: "stretch", |
13 LEFT: "left", | 13 LEFT: "left", |
14 RIGHT: "right", | 14 RIGHT: "right", |
15 CENTER: "center" | 15 CENTER: "center", |
| 16 // Assigns all extra weight to the right most key. TODO(rsadam): remove. |
| 17 STRETCHRIGHT: "stretchright" |
16 } | 18 } |
17 | 19 |
18 /** | 20 /** |
19 * Ratio of key height and font size. | 21 * Ratio of key height and font size. |
20 * @type {number} | 22 * @type {number} |
21 */ | 23 */ |
22 var FONT_SIZE_RATIO = 3; | 24 var FONT_SIZE_RATIO = 2.5; |
23 | 25 |
24 /** | 26 /** |
25 * @type {enum} | 27 * @type {enum} |
26 * Possible layout alignments. | 28 * Possible layout alignments. |
27 */ | 29 */ |
28 var LayoutAlignment = { | 30 var LayoutAlignment = { |
29 CENTER: "center", | 31 CENTER: "center", |
30 STRETCH: "stretch", | 32 STRETCH: "stretch", |
31 } | 33 } |
32 | 34 |
(...skipping 21 matching lines...) Expand all Loading... |
54 /** | 56 /** |
55 * The default weight of a key in the X direction. | 57 * The default weight of a key in the X direction. |
56 * @type {number} | 58 * @type {number} |
57 */ | 59 */ |
58 var DEFAULT_KEY_WEIGHT_X = 100; | 60 var DEFAULT_KEY_WEIGHT_X = 100; |
59 | 61 |
60 /** | 62 /** |
61 * The default weight of a key in the Y direction. | 63 * The default weight of a key in the Y direction. |
62 * @type {number} | 64 * @type {number} |
63 */ | 65 */ |
64 var DEFAULT_KEY_WEIGHT_Y = 100; | 66 var DEFAULT_KEY_WEIGHT_Y = 70; |
65 | 67 |
66 /** | 68 /** |
67 * The top padding on each key. | 69 * The top padding on each key. |
68 * @type {number} | 70 * @type {number} |
69 */ | 71 */ |
70 // TODO(rsadam): Remove this variable once figure out how to calculate this | 72 // TODO(rsadam): Remove this variable once figure out how to calculate this |
71 // number before the key is rendered. | 73 // number before the key is rendered. |
72 var KEY_PADDING_TOP = 1; | 74 var KEY_PADDING_TOP = 1; |
73 var KEY_PADDING_BOTTOM = 1; | 75 var KEY_PADDING_BOTTOM = 1; |
OLD | NEW |