X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fui%2Fkeyboard%2Fresources%2Fconstants.js;h=8f9d00ed41b10dd15b341f3fcab124e56737fe03;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=b9e9c96056fbbe0a5332c80e7f414e3d86177f29;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ui/keyboard/resources/constants.js b/src/ui/keyboard/resources/constants.js index b9e9c96..8f9d00e 100644 --- a/src/ui/keyboard/resources/constants.js +++ b/src/ui/keyboard/resources/constants.js @@ -2,40 +2,34 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/** - * Aspect ratio of keyboard. - * @type {number} - */ -var ASPECT_RATIO = 4.5; - var RowAlignment = { STRETCH: "stretch", LEFT: "left", RIGHT: "right", - CENTER: "center" + CENTER: "center", } /** * Ratio of key height and font size. * @type {number} */ -var FONT_SIZE_RATIO = 3; +var FONT_SIZE_RATIO = 2.5; /** - * The number of rows in each keyset. - * @type {number} + * @type {enum} + * Possible layout alignments. */ -// TODO(bshe): The number of rows should equal to the number of kb-row elements -// in kb-keyset. Remove this variable once figure out how to calculate the -// number from keysets. -var ROW_LENGTH = 4; +var LayoutAlignment = { + CENTER: "center", + STRETCH: "stretch", +} /** * The enumeration of swipe directions. * @const * @type {Enum} */ -var SWIPE_DIRECTION = { +var SwipeDirection = { RIGHT: 0x1, LEFT: 0x2, UP: 0x4, @@ -52,7 +46,7 @@ var DEFAULT_KEY_WEIGHT_X = 100; * The default weight of a key in the Y direction. * @type {number} */ -var DEFAULT_KEY_WEIGHT_Y = 60; +var DEFAULT_KEY_WEIGHT_Y = 70; /** * The top padding on each key. @@ -60,4 +54,5 @@ var DEFAULT_KEY_WEIGHT_Y = 60; */ // TODO(rsadam): Remove this variable once figure out how to calculate this // number before the key is rendered. -var KEY_PADDING_TOP = 2; +var KEY_PADDING_TOP = 1; +var KEY_PADDING_BOTTOM = 1;