OLD | NEW |
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
2 // limitations under the License. | 2 // limitations under the License. |
3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
7 // | 7 // |
8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
9 // | 9 // |
10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
(...skipping 25 matching lines...) Expand all Loading... |
36 var keySequenceOf15 = util.createKeySequence(baseKeySpec, 15); | 36 var keySequenceOf15 = util.createKeySequence(baseKeySpec, 15); |
37 var row1 = util.createLinearLayout({ | 37 var row1 = util.createLinearLayout({ |
38 'id': 'row1', | 38 'id': 'row1', |
39 'children': [keySequenceOf15] | 39 'children': [keySequenceOf15] |
40 }); | 40 }); |
41 | 41 |
42 | 42 |
43 // Row2 and row3 | 43 // Row2 and row3 |
44 | 44 |
45 // First linear layout at the left of the enter. | 45 // First linear layout at the left of the enter. |
46 var tabKey = i18n.input.chrome.inputview.layouts.util.createKey({ | 46 var tabKey = util.createKey({ |
47 'widthInWeight': 1.5 | 47 'widthInWeight': 1.5 |
48 }); | 48 }); |
49 var keySequenceOf11 = i18n.input.chrome.inputview.layouts.util. | 49 var keySequenceOf11 = util. |
50 createKeySequence(baseKeySpec, 11); | 50 createKeySequence(baseKeySpec, 11); |
51 var slashKey = i18n.input.chrome.inputview.layouts.util.createKey({ | 51 var slashKey = util.createKey({ |
52 'widthInWeight': 1.25 | 52 'widthInWeight': 1.25 |
53 }); | 53 }); |
54 var row2 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({ | 54 var row2 = util.createLinearLayout({ |
55 'id': 'row2', | 55 'id': 'row2', |
56 'children': [tabKey, keySequenceOf11, slashKey] | 56 'children': [tabKey, keySequenceOf11, slashKey] |
57 }); | 57 }); |
58 | 58 |
59 // Second linear layout at the right of the enter. | 59 // Second linear layout at the right of the enter. |
60 var capslockKey = i18n.input.chrome.inputview.layouts.util.createKey({ | 60 var capslockKey = util.createKey({ |
61 'widthInWeight': 1.75 | 61 'widthInWeight': 1.75 |
62 }); | 62 }); |
63 var keySequenceOf12 = i18n.input.chrome.inputview.layouts.util. | 63 var keySequenceOf12 = util. |
64 createKeySequence(baseKeySpec, 12); | 64 createKeySequence(baseKeySpec, 12); |
65 var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({ | 65 var row3 = util.createLinearLayout({ |
66 'id': 'row3', | 66 'id': 'row3', |
67 'children': [capslockKey, keySequenceOf12] | 67 'children': [capslockKey, keySequenceOf12] |
68 }); | 68 }); |
69 | 69 |
70 // Vertical layout contains the two rows at the left of the enter. | 70 // Vertical layout contains the two rows at the left of the enter. |
71 var vLayout = i18n.input.chrome.inputview.layouts.util.createVerticalLayout({ | 71 var vLayout = util.createVerticalLayout({ |
72 'id': 'row2-3-left', | 72 'id': 'row2-3-left', |
73 'children': [row2, row3] | 73 'children': [row2, row3] |
74 }); | 74 }); |
75 | 75 |
76 // Vertical layout contains enter key. | 76 // Vertical layout contains enter key. |
77 var enterKey = i18n.input.chrome.inputview.layouts.util.createKey({ | 77 var enterKey = util.createKey({ |
78 'widthInWeight': 1.25, | 78 'widthInWeight': 1.25, |
79 'heightInWeight': 2 | 79 'heightInWeight': 2 |
80 }); | 80 }); |
81 var enterLayout = i18n.input.chrome.inputview.layouts.util. | 81 var enterLayout = util. |
82 createVerticalLayout({ | 82 createVerticalLayout({ |
83 'id': 'row2-3-right', | 83 'id': 'row2-3-right', |
84 'children': [enterKey] | 84 'children': [enterKey] |
85 }); | 85 }); |
86 | 86 |
87 // Linear layout contains the two vertical layout. | 87 // Linear layout contains the two vertical layout. |
88 var row2and3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({ | 88 var row2and3 = util.createLinearLayout({ |
89 'id': 'row2-3', | 89 'id': 'row2-3', |
90 'children': [vLayout, enterLayout] | 90 'children': [vLayout, enterLayout] |
91 }); | 91 }); |
92 | 92 |
93 // Row4 | 93 // Row4 |
94 var shiftLeft = i18n.input.chrome.inputview.layouts.util.createKey({ | 94 var shiftLeft = util.createKey({ |
95 'widthInWeight': 2.25 | 95 'widthInWeight': 2.25 |
96 }); | 96 }); |
97 keySequenceOf11 = i18n.input.chrome.inputview.layouts.util.createKeySequence( | 97 keySequenceOf11 = util.createKeySequence( |
98 baseKeySpec, 11); | 98 baseKeySpec, 11); |
99 var shiftRight = i18n.input.chrome.inputview.layouts.util.createKey({ | 99 var shiftRight = util.createKey({ |
100 'widthInWeight': 1.75 | 100 'widthInWeight': 1.75 |
101 }); | 101 }); |
102 var row4 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({ | 102 var row4 = util.createLinearLayout({ |
103 'id': 'row4', | 103 'id': 'row4', |
104 'children': [shiftLeft, keySequenceOf11, shiftRight] | 104 'children': [shiftLeft, keySequenceOf11, shiftRight] |
105 }); | 105 }); |
106 | 106 |
107 return [row1, row2and3, row4]; | 107 return [row1, row2and3, row4]; |
108 }; | 108 }; |
109 }); // goog.scope | 109 }); // goog.scope |
OLD | NEW |