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

Unified Diff: third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js

Issue 1257313003: Update Google Input Tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Free up grd resources. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js b/third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js
index ffb29c592e23e0400081e1a07a4da24595a62de3..eee564a8203cc19169a4afdff6650f269c0e7c31 100644
--- a/third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js
+++ b/third_party/google_input_tools/src/chrome/os/inputview/layouts/rowsofcompact.js
@@ -18,54 +18,55 @@ goog.provide('i18n.input.chrome.inputview.layouts.RowsOfCompactZhuyin');
goog.require('i18n.input.chrome.inputview.layouts.util');
+goog.scope(function() {
+var layouts = i18n.input.chrome.inputview.layouts;
+var util = layouts.util;
+
/**
* Creates the top three rows for compact qwerty keyboard.
*
* @return {!Array.<!Object>} The rows.
*/
-i18n.input.chrome.inputview.layouts.RowsOfCompact.create = function() {
+layouts.RowsOfCompact.create = function() {
var baseKeySpec = {
'widthInWeight': 1,
'heightInWeight': 1
};
// Row1
- var keySequenceOf10 = i18n.input.chrome.inputview.layouts.util.
- createKeySequence(baseKeySpec, 10);
- var backspaceKey = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.2
+ var keySequenceOf10 = util.createKeySequence(baseKeySpec, 10);
+ var backspaceKey = util.createKey({
+ 'widthInWeight': 1.15625
});
- var row1 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
+ var row1 = util.createLinearLayout({
'id': 'row1',
'children': [keySequenceOf10, backspaceKey]
});
// Row2
// How to add padding
- var leftKeyWithPadding = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.5
+ var leftKeyWithPadding = util.createKey({
+ 'widthInWeight': 1.5
});
- var keySequenceOf8 = i18n.input.chrome.inputview.layouts.util.
- createKeySequence(baseKeySpec, 8);
- var enterKey = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.7
+ var keySequenceOf8 = util.createKeySequence(baseKeySpec, 8);
+ var enterKey = util.createKey({
+ 'widthInWeight': 1.65625
});
- var row2 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
+ var row2 = util.createLinearLayout({
'id': 'row2',
'children': [leftKeyWithPadding, keySequenceOf8, enterKey]
});
// Row3
- var shiftLeftKey = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.1
+ var shiftLeftKey = util.createKey({
+ 'widthInWeight': 1.078125
});
- var keySequenceOf9 = i18n.input.chrome.inputview.layouts.util.
- createKeySequence(baseKeySpec, 9);
- var shiftRightKey = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.1
+ var keySequenceOf9 = util.createKeySequence(baseKeySpec, 9);
+ var shiftRightKey = util.createKey({
+ 'widthInWeight': 1.078125
});
- var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
+ var row3 = util.createLinearLayout({
'id': 'row3',
'children': [shiftLeftKey, keySequenceOf9, shiftRightKey]
});
@@ -73,6 +74,7 @@ i18n.input.chrome.inputview.layouts.RowsOfCompact.create = function() {
return [row1, row2, row3];
};
+
/**
* Creates the top three rows for compact azerty keyboard.
*
@@ -123,6 +125,7 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactAzerty.create = function() {
return [row1, row2, row3];
};
+
/**
* Creates the top three rows for compact nordic keyboard.
*
@@ -161,12 +164,12 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactNordic.create = function() {
'widthInWeight': 1.1
});
var leftKeyWithPadding = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.5
+ 'widthInWeight': 1.5
});
var keySequenceOf7 = i18n.input.chrome.inputview.layouts.util.
createKeySequence(baseKeySpec, 7);
var rightKeyWithPadding = i18n.input.chrome.inputview.layouts.util.createKey({
- 'widthInWeight': 1.5
+ 'widthInWeight': 1.5
});
var shiftRightKey = i18n.input.chrome.inputview.layouts.util.createKey({
'widthInWeight': 1.1
@@ -174,7 +177,7 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactNordic.create = function() {
var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
'id': 'row3',
'children': [shiftLeftKey, leftKeyWithPadding, keySequenceOf7,
- rightKeyWithPadding, shiftRightKey]
+ rightKeyWithPadding, shiftRightKey]
});
return [row1, row2, row3];
};
@@ -186,7 +189,7 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactNordic.create = function() {
* @return {!Array.<!Object>} The rows.
*/
i18n.input.chrome.inputview.layouts.RowsOfCompactZhuyin.create = function() {
- var baseKeySpec = {
+ var baseKeySpec = {
'widthInWeight': 1.01,
'heightInWeight': 3
};
@@ -225,9 +228,9 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactZhuyin.create = function() {
var topFourRows =
i18n.input.chrome.inputview.layouts.util.createVerticalLayout({
- 'id': 'topFourRows',
- 'children': [row1, row2, row3, row4]
- });
+ 'id': 'topFourRows',
+ 'children': [row1, row2, row3, row4]
+ });
var sideKeySpec = {
'widthInWeight': 1.1,
@@ -251,3 +254,5 @@ i18n.input.chrome.inputview.layouts.RowsOfCompactZhuyin.create = function() {
});
return [topRows];
};
+
+}); // goog.scope

Powered by Google App Engine
This is Rietveld 408576698