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

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

Issue 701603002: Update to google-input-tools version 1.0.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/compactkbd_zhuyin_layout.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/layouts/compactkbd_zhuyin_layout.js b/third_party/google_input_tools/src/chrome/os/inputview/layouts/compactkbd_zhuyin_layout.js
new file mode 100644
index 0000000000000000000000000000000000000000..eb7ef4639c5ceb53da3473b2948c0373cb096bc4
--- /dev/null
+++ b/third_party/google_input_tools/src/chrome/os/inputview/layouts/compactkbd_zhuyin_layout.js
@@ -0,0 +1,93 @@
+// Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
+// limitations under the License.
+// See the License for the specific language governing permissions and
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// distributed under the License is distributed on an "AS-IS" BASIS,
+// Unless required by applicable law or agreed to in writing, software
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// You may obtain a copy of the License at
+// you may not use this file except in compliance with the License.
+// Licensed under the Apache License, Version 2.0 (the "License");
+//
+goog.require('i18n.input.chrome.inputview.layouts.CompactSpaceRow');
+goog.require('i18n.input.chrome.inputview.layouts.RowsOfCompact');
+goog.require('i18n.input.chrome.inputview.layouts.util');
+
+
+(function() {
+ i18n.input.chrome.inputview.layouts.util.setPrefix('compactkbd-k-');
+
+ var topRows =
+ i18n.input.chrome.inputview.layouts.RowsOfCompactZhuyin.create();
+
+ var digitSwitcher = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1.1,
+ 'heightInWeight': 4
+ });
+ var globeOrSymbolKey = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'condition': i18n.input.chrome.inputview.ConditionName.SHOW_GLOBE_OR_SYMBOL,
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var menuKey = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'condition': i18n.input.chrome.inputview.ConditionName.SHOW_MENU,
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var comma = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var space = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 3,
+ 'heightInWeight': 4
+ });
+ var character = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var period = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var switcher = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1,
+ 'heightInWeight': 4
+ });
+ var hide = i18n.input.chrome.inputview.layouts.util.createKey({
+ 'widthInWeight': 1.1,
+ 'heightInWeight': 4
+ });
+ menuKey['spec']['giveWeightTo'] = space['spec']['id'];
+ globeOrSymbolKey['spec']['giveWeightTo'] = space['spec']['id'];
+
+ var spaceRow = i18n.input.chrome.inputview.layouts.util.
+ createLinearLayout({
+ 'id': 'spaceKeyrow',
+ 'children': [digitSwitcher, globeOrSymbolKey, menuKey, comma,
+ space, character, period, switcher, hide]
+ });
+
+ // Keyboard view.
+ var keyboardView = i18n.input.chrome.inputview.layouts.util.createLayoutView({
+ 'id': 'keyboardView',
+ 'children': [topRows, spaceRow],
+ 'widthPercent': 100,
+ 'heightPercent': 100
+ });
+
+ var keyboardContainer = i18n.input.chrome.inputview.layouts.util.
+ createLinearLayout({
+ 'id': 'keyboardContainer',
+ 'children': [keyboardView]
+ });
+
+ var data = {
+ 'layoutID': 'compactkbd-zhuyin',
+ 'widthInWeight': 15,
+ 'children': [keyboardContainer]
+ };
+ google.ime.chrome.inputview.onLayoutLoaded(data);
+}) ();

Powered by Google App Engine
This is Rietveld 408576698