From 052419797a1f2113b199765ed3fc5039817a3307 Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Thu, 29 Aug 2019 11:37:53 -0300 Subject: [PATCH 01/57] implement qertyu flick keyboard make flickeys globally accessible --- debian/control | 11 ++ debian/ubuntu-keyboard-english-flick.install | 1 + plugins/en@flick/en@flick.pro | 9 ++ plugins/en@flick/qml/Keyboard_en@flick.qml | 130 +++++++++++++++++ .../en@flick/qml/Keyboard_en@flick_email.qml | 131 +++++++++++++++++ .../en@flick/qml/Keyboard_en@flick_url.qml | 133 ++++++++++++++++++ .../qml/Keyboard_en@flick_url_search.qml | 133 ++++++++++++++++++ plugins/en@flick/qml/qml.pro | 20 +++ plugins/en@flick/src/englishflickplugin.h | 27 ++++ plugins/en@flick/src/englishflickplugin.json | 7 + plugins/en@flick/src/src.pro | 31 ++++ plugins/ja/qml/Keyboard_ja.qml | 5 +- plugins/ja/qml/Keyboard_ja_email.qml | 9 +- plugins/ja/qml/Keyboard_ja_url.qml | 7 +- plugins/ja/qml/Keyboard_ja_url_search.qml | 7 +- plugins/ja/qml/keys/KanaSwitchKey.qml | 3 +- plugins/ja/qml/keys/ModifierKey.qml | 4 +- plugins/plugins.pro | 1 + qml/keys/CaseSwitchKey.qml | 108 ++++++++++++++ qml/keys/CharKey.qml | 2 +- {plugins/ja/qml => qml}/keys/CursorKey.qml | 10 +- {plugins/ja/qml => qml}/keys/FlickArea.qml | 0 {plugins/ja/qml => qml}/keys/FlickCharKey.qml | 21 +-- {plugins/ja/qml => qml}/keys/FlickPop.qml | 0 {plugins/ja/qml => qml}/keys/FlickPopKey.qml | 0 .../DomainKey.qml => qml/keys/StringKey.qml | 0 qml/keys/key_constants.js | 12 ++ qml/keys/languages.js | 1 + qml/keys/qmldir | 8 ++ 29 files changed, 799 insertions(+), 32 deletions(-) create mode 100644 debian/ubuntu-keyboard-english-flick.install create mode 100644 plugins/en@flick/en@flick.pro create mode 100644 plugins/en@flick/qml/Keyboard_en@flick.qml create mode 100644 plugins/en@flick/qml/Keyboard_en@flick_email.qml create mode 100644 plugins/en@flick/qml/Keyboard_en@flick_url.qml create mode 100644 plugins/en@flick/qml/Keyboard_en@flick_url_search.qml create mode 100644 plugins/en@flick/qml/qml.pro create mode 100644 plugins/en@flick/src/englishflickplugin.h create mode 100644 plugins/en@flick/src/englishflickplugin.json create mode 100644 plugins/en@flick/src/src.pro create mode 100644 qml/keys/CaseSwitchKey.qml rename {plugins/ja/qml => qml}/keys/CursorKey.qml (90%) rename {plugins/ja/qml => qml}/keys/FlickArea.qml (100%) rename {plugins/ja/qml => qml}/keys/FlickCharKey.qml (94%) rename {plugins/ja/qml => qml}/keys/FlickPop.qml (100%) rename {plugins/ja/qml => qml}/keys/FlickPopKey.qml (100%) rename plugins/ja/qml/keys/DomainKey.qml => qml/keys/StringKey.qml (100%) diff --git a/debian/control b/debian/control index bed4dc35e..0a52783f6 100644 --- a/debian/control +++ b/debian/control @@ -101,6 +101,7 @@ Depends: autopilot-qt5 (>= 1.4), ubuntu-keyboard-emoji (>= ${source:Version}), ubuntu-keyboard-english (>= ${source:Version}), ubuntu-keyboard-english-dvorak (>= ${source:Version}), + ubuntu-keyboard-english-flick (>= ${source:Version}), ubuntu-keyboard-persian (>= ${source:Version}), ubuntu-keyboard-finnish (>= ${source:Version}), ubuntu-keyboard-french (>= ${source:Version}), @@ -254,6 +255,16 @@ Depends: ubuntu-keyboard (= ${binary:Version}), Description: Ubuntu on-screen keyboard data files - English Dvorak Data files for the Ubuntu virtual keyboard - English Dvorak +Package: ubuntu-keyboard-english-flick +Architecture: any +Depends: ubuntu-keyboard (= ${binary:Version}), + ubuntu-keyboard-english, + hunspell-en-us, + ${misc:Depends}, + ${shlibs:Depends}, +Description: Ubuntu on-screen keyboard data files - English Flick + Data files for the Ubuntu virtual keyboard - English Flick + Package: ubuntu-keyboard-esperanto Architecture: any Depends: ubuntu-keyboard (= ${binary:Version}), diff --git a/debian/ubuntu-keyboard-english-flick.install b/debian/ubuntu-keyboard-english-flick.install new file mode 100644 index 000000000..65f786e80 --- /dev/null +++ b/debian/ubuntu-keyboard-english-flick.install @@ -0,0 +1 @@ +usr/share/maliit/plugins/com/ubuntu/lib/en@flick/ diff --git a/plugins/en@flick/en@flick.pro b/plugins/en@flick/en@flick.pro new file mode 100644 index 000000000..ae754ea32 --- /dev/null +++ b/plugins/en@flick/en@flick.pro @@ -0,0 +1,9 @@ +CONFIG += ordered +TEMPLATE = subdirs +SUBDIRS = \ + src \ + qml + +QMAKE_EXTRA_TARGETS += check +check.target = check +check.CONFIG = recursive diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml new file mode 100644 index 000000000..aa85d6b85 --- /dev/null +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -0,0 +1,130 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import keys 1.0 + +KeyPad { + + anchors.fill: parent; + content: c1 + Column { + id: c1 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; + anchors.fill: parent; + spacing: 0 + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + CaseSwitchKey { id: layout; } + + FlickCharKey { + label: layout.state == "caps" ? "QER" : "qer"; + leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; + annotation: layout.state == "caps" ? "1:" : "1:"; + } + FlickCharKey { + label: layout.state == "caps" ? "TYU" : "tyu"; + leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; + annotation: layout.state == "caps" ? "2$" : "2$"; + } + FlickCharKey { + label: layout.state == "caps" ? "IOP" : "iop"; + leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; + annotation: layout.state == "caps" ? "3#" : "3#"; + } + BackspaceKey { rightSide: true; width: panel.keyWidth;height:layout.height;} + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + CursorKey { leftSide:true} + FlickCharKey { + label: layout.state == "caps" ? "AWD" : "awd"; + leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; + annotation: layout.state == "caps" ? "4S" : "4s"; + } + FlickCharKey { + label: layout.state == "caps" ? "(F)" : "(f)"; + leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; + annotation: layout.state == "caps" ? "5G" : "5g"; + } + FlickCharKey { + label: layout.state == "caps" ? "HKL" : "hkl"; + leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; + annotation: layout.state == "caps" ? "6J" : "6j"; + } + CursorKey { rightSide:true; } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + FlickCharKey { + label: layout.state == "caps" ? "`_" : "`_" + leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } + FlickCharKey { + label: layout.state == "caps" ? "ZXC" : "zxc" + leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] + annotation: layout.state == "caps" ? "7\\" : "7\\" + } + FlickCharKey { + label: layout.state == "caps" ? "[ * ]" : "[ * ]" + leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] + annotation: layout.state == "caps" ? "8V" : "8v" + } + FlickCharKey { + label: layout.state == "caps" ? "BNM" : "bnm" + leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] + annotation: layout.state == "caps" ? "9/" : "9/" + } + FlickCharKey { + label: layout.state == "caps" ? "&!" : "&!" + leaves: layout.state == "caps" ? [";", "&", "!", "", "~"] : [";", "&", "!", "", "~"] + annotation: layout.state == "caps" ? ";~" : ";~" + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + LanguageKey { width: panel.keyWidth; height:layout.height;} + FlickCharKey { + label: layout.state == "caps" ? "< - >" : "< - >" + leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; + annotation: layout.state == "caps" ? ",+" : ",+" + } + FlickCharKey { + label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" + leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; + annotation: layout.state == "caps" ? "0%" : "0%"; + } + FlickCharKey { + label: layout.state == "caps" ? "{ ? }" : "{ ? }"; + leaves: layout.state == "caps" ? [".", "{", "?", "}", "@"] : [".", "{", "?", "}", "@"]; + annotation: layout.state == "caps" ? ".@" : ".@"; + } + CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height } + } + } // column +} diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml new file mode 100644 index 000000000..94113f528 --- /dev/null +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -0,0 +1,131 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import keys 1.0 + +KeyPad { + anchors.fill:parent; + content: c1 + + Column { + id: c1 + anchors.fill:parent; + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; + spacing: 0 + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + CaseSwitchKey { id: layout; } + FlickCharKey { + label: layout.state == "caps" ? "QER" : "qer"; + leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; + annotation: layout.state == "caps" ? "1:" : "1:"; + } + FlickCharKey { + label: layout.state == "caps" ? "TYU" : "tyu"; + leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; + annotation: layout.state == "caps" ? "2$" : "2$"; + } + FlickCharKey { + label: layout.state == "caps" ? "IOP" : "iop"; + leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; + annotation: layout.state == "caps" ? "3#" : "3#"; + } + BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "AWD" : "awd"; + leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; + annotation: layout.state == "caps" ? "4S" : "4s"; + } + FlickCharKey { + label: layout.state == "caps" ? "(F)" : "(f)"; + leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; + annotation: layout.state == "caps" ? "5G" : "5g"; + } + FlickCharKey { + label: layout.state == "caps" ? "HKL" : "hkl"; + leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; + annotation: layout.state == "caps" ? "6J" : "6j"; + } + CursorKey { rightSide:true; } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + FlickCharKey { + label: layout.state == "caps" ? "`_" : "`_" + leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } + FlickCharKey { + label: layout.state == "caps" ? "ZXC" : "zxc" + leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] + annotation: layout.state == "caps" ? "7\\" : "7\\" + } + FlickCharKey { + label: layout.state == "caps" ? "[*]" : "[*]" + leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] + annotation: layout.state == "caps" ? "8V" : "8v" + } + FlickCharKey { + label: layout.state == "caps" ? "BNM" : "bnm" + leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] + annotation: layout.state == "caps" ? "9/" : "9/" + } + FlickCharKey { + label: layout.state == "caps" ? "&!" : "&!" + leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + LanguageKey { id: languageMenuButton; height:layout.height;} + FlickCharKey { + label: layout.state == "caps" ? "< - >" : "< - >" + leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; + annotation: layout.state == "caps" ? ",+" : ",+" + } + FlickCharKey { + label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" + leaves: layout.state == "caps" ? ["0", "'", "^", "\"","%"] : ["0", "'", "^", "\"","%"]; + annotation: layout.state == "caps" ? "0%" : "0%"; + } + StringKey { + label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; + leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : + [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; + annotation: layout.state == "caps" ? "." : ".net" + } + CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} + } + + } // column +} diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml new file mode 100644 index 000000000..360264877 --- /dev/null +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -0,0 +1,133 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import keys 1.0 + +KeyPad { + + anchors.fill:parent; + content: c1 + + Column { + id: c1 + anchors.fill:parent; + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; + spacing: 0 + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + CaseSwitchKey { id: layout; } + FlickCharKey { + label: layout.state == "caps" ? "QER" : "qer"; + leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; + annotation: layout.state == "caps" ? "1:" : "1:"; + } + FlickCharKey { + label: layout.state == "caps" ? "TYU" : "tyu"; + leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; + annotation: layout.state == "caps" ? "2$" : "2$"; + } + FlickCharKey { + label: layout.state == "caps" ? "IOP" : "iop"; + leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; + annotation: layout.state == "caps" ? "3#" : "3#"; + } + BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "AWD" : "awd"; + leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; + annotation: layout.state == "caps" ? "4S" : "4s"; + } + FlickCharKey { + label: layout.state == "caps" ? "(F)" : "(f)"; + leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; + annotation: layout.state == "caps" ? "5G" : "5g"; + } + FlickCharKey { + label: layout.state == "caps" ? "HKL" : "hkl"; + leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; + annotation: layout.state == "caps" ? "6J" : "6j"; + } + CursorKey { rightSide:true; } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + FlickCharKey { + label: layout.state == "caps" ? "`_" : "`_" + leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } + FlickCharKey { + label: layout.state == "caps" ? "ZXC" : "zxc" + leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] + annotation: layout.state == "caps" ? "7\\" : "7\\" + } + FlickCharKey { + label: layout.state == "caps" ? "[*]" : "[*]" + leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] + annotation: layout.state == "caps" ? "8V" : "8v" + } + FlickCharKey { + label: layout.state == "caps" ? "BNM" : "bnm" + leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] + annotation: layout.state == "caps" ? "9/" : "9/" + } + FlickCharKey { + label: layout.state == "caps" ? "&!" : "&!" + leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + LanguageKey { id: languageMenuButton; height:layout.height;} + FlickCharKey { + label: layout.state == "caps" ? "< - >" : "< - >" + leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; + annotation: layout.state == "caps" ? ",+" : ",+" + } + FlickCharKey { + label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" + leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; + annotation: layout.state == "caps" ? "0%" : "0%"; + } + StringKey { + label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; + leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : + [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; + annotation: layout.state == "caps" ? "." : ".net" + } + CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} + } + + } // column +} diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml new file mode 100644 index 000000000..6fcb0deb5 --- /dev/null +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -0,0 +1,133 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import keys 1.0 + +KeyPad { + + anchors.fill:parent; + content: c1 + + Column { + id: c1 + anchors.fill:parent; + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; + spacing: 0 + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + CaseSwitchKey { id: layout; } + FlickCharKey { + label: layout.state == "caps" ? "QER" : "qer"; + leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; + annotation: layout.state == "caps" ? "1:" : "1:"; + } + FlickCharKey { + label: layout.state == "caps" ? "TYU" : "tyu"; + leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; + annotation: layout.state == "caps" ? "2$" : "2$"; + } + FlickCharKey { + label: layout.state == "caps" ? "IOP" : "iop"; + leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; + annotation: layout.state == "caps" ? "3#" : "3#"; + } + BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "AWD" : "awd"; + leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; + annotation: layout.state == "caps" ? "4S" : "4s"; + } + FlickCharKey { + label: layout.state == "caps" ? "(F)" : "(f)"; + leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; + annotation: layout.state == "caps" ? "5G" : "5g"; + } + FlickCharKey { + label: layout.state == "caps" ? "HKL" : "hkl"; + leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; + annotation: layout.state == "caps" ? "6J" : "6j"; + } + CursorKey { rightSide:true; } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + FlickCharKey { + label: layout.state == "caps" ? "`_" : "`_" + leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } + FlickCharKey { + label: layout.state == "caps" ? "ZXC" : "zxc" + leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] + annotation: layout.state == "caps" ? "7\\" : "7\\" + } + FlickCharKey { + label: layout.state == "caps" ? "[*]" : "[*]" + leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] + annotation: layout.state == "caps" ? "8V" : "8v" + } + FlickCharKey { + label: layout.state == "caps" ? "BNM" : "bnm" + leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] + annotation: layout.state == "caps" ? "9/" : "9/" + } + FlickCharKey { + label: layout.state == "caps" ? "&!" : "&!" + leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + LanguageKey { id: languageMenuButton; height:layout.height;} + FlickCharKey { + label: layout.state == "caps" ? "< - >" : "< - >" + leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; + annotation: layout.state == "caps" ? ",+" : ",+" + } + FlickCharKey { + label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" + leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; + annotation: layout.state == "caps" ? "0%" : "0%"; + } + StringKey { + label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; + leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : + [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; + annotation: layout.state == "caps" ? "." : ".net" + } + CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} + } + + } // column +} diff --git a/plugins/en@flick/qml/qml.pro b/plugins/en@flick/qml/qml.pro new file mode 100644 index 000000000..22cb76550 --- /dev/null +++ b/plugins/en@flick/qml/qml.pro @@ -0,0 +1,20 @@ +TOP_BUILDDIR = $$OUT_PWD/../../.. +TOP_SRCDIR = $$PWD/../../.. + +include($${TOP_SRCDIR}/config.pri) + +TARGET = dummy +TEMPLATE = lib + +lang_en@flick.path = "$$UBUNTU_KEYBOARD_LIB_DIR/en@flick/" +lang_en@flick.files = *.qml *.js + +INSTALLS += lang_en@flick + +# for QtCreator +OTHER_FILES += \ + Keyboard_en@flick.qml \ + Keyboard_en@flick_email.qml \ + Keyboard_en@flick_url.qml \ + Keyboard_en@flick_url_search.qml + diff --git a/plugins/en@flick/src/englishflickplugin.h b/plugins/en@flick/src/englishflickplugin.h new file mode 100644 index 000000000..eb3adce45 --- /dev/null +++ b/plugins/en@flick/src/englishflickplugin.h @@ -0,0 +1,27 @@ +#ifndef ENGLISHFLICKPLUGIN_H +#define ENGLISHFLICKPLUGIN_H + +#include +#include "languageplugininterface.h" +#include "westernlanguagesplugin.h" + +//#include + +class EnglishFlickPlugin : public WesternLanguagesPlugin +{ + Q_OBJECT + Q_INTERFACES(LanguagePluginInterface) + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.EnglishFlickPlugin" FILE "englishflickplugin.json") + +public: + explicit EnglishFlickPlugin(QObject* parent = 0) + : WesternLanguagesPlugin(parent) + { + } + + virtual ~EnglishFlickPlugin() + { + } +}; + +#endif // ENGLISHFLICKPLUGIN_H diff --git a/plugins/en@flick/src/englishflickplugin.json b/plugins/en@flick/src/englishflickplugin.json new file mode 100644 index 000000000..b028ae8c8 --- /dev/null +++ b/plugins/en@flick/src/englishflickplugin.json @@ -0,0 +1,7 @@ +{ + "IID": "org.qt-project.Qt.Examples.EnglishFlickPlugin", + "MetaData": { + }, + "className": "EnglishFlickPlugin", + "debug": true +} diff --git a/plugins/en@flick/src/src.pro b/plugins/en@flick/src/src.pro new file mode 100644 index 000000000..81d0f619e --- /dev/null +++ b/plugins/en@flick/src/src.pro @@ -0,0 +1,31 @@ +TOP_BUILDDIR = $$OUT_PWD/../../.. +TOP_SRCDIR = $$PWD/../../.. + +include($${TOP_SRCDIR}/config.pri) + +TEMPLATE = lib +CONFIG += plugin +QT += widgets +INCLUDEPATH += \ + $${TOP_SRCDIR}/src/ \ + $${TOP_SRCDIR}/src/lib/ \ + $${TOP_SRCDIR}/src/lib/logic/ + $${TOP_SRCDIR}/plugins/westernsupport + +HEADERS = \ + englishflickplugin.h + +TARGET = $$qtLibraryTarget(en@flickplugin) + +EXAMPLE_FILES = englishflickplugin.json + +# generate database for presage: +PLUGIN_INSTALL_PATH = $${UBUNTU_KEYBOARD_LIB_DIR}/en@flick/ + +OTHER_FILES += \ + englishflickplugin.json + +LIBS += $${TOP_BUILDDIR}/plugins/plugins/libwesternsupport.a -lpresage -lhunspell + +INCLUDEPATH += $$PWD/../../westernsupport +DEPENDPATH += $$PWD/../../westernsupport diff --git a/plugins/ja/qml/Keyboard_ja.qml b/plugins/ja/qml/Keyboard_ja.qml index 107396604..6c23a4793 100644 --- a/plugins/ja/qml/Keyboard_ja.qml +++ b/plugins/ja/qml/Keyboard_ja.qml @@ -25,6 +25,7 @@ KeyPad { Column { id: c1 + property int keyHeight: panel.keyHeight; anchors.fill: parent spacing: 0 @@ -55,7 +56,7 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { action: "left"; } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "kana" ? "た" : "GHI"; leaves: layout.state == "kana" ? ["た", "ち", "つ", "て", "と"] : ["g", "h", "i", "(", "4"]; @@ -71,7 +72,7 @@ KeyPad { leaves: layout.state == "kana" ? ["は", "ひ", "ふ", "へ", "ほ"] : ["m", "n", "o", ")", "6"]; annotation: layout.state == "kana" ? "" : "6)"; } - CursorKey { action: "right"; } + CursorKey { rightSide:true; } } Row { diff --git a/plugins/ja/qml/Keyboard_ja_email.qml b/plugins/ja/qml/Keyboard_ja_email.qml index 7bcae8d22..effc1c040 100644 --- a/plugins/ja/qml/Keyboard_ja_email.qml +++ b/plugins/ja/qml/Keyboard_ja_email.qml @@ -15,8 +15,8 @@ */ import QtQuick 2.4 -import "keys/" import keys 1.0 +import "keys/" KeyPad { anchors.fill: parent @@ -25,6 +25,7 @@ KeyPad { Column { id: c1 + property int keyHeight: panel.keyHeight; anchors.fill: parent spacing: 0 @@ -55,7 +56,7 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { action: "left"; } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "kana" ? "た" : "GHI"; leaves: layout.state == "kana" ? ["た", "ち", "つ", "て", "と"] : ["g", "h", "i", "(", "4"]; @@ -71,7 +72,7 @@ KeyPad { leaves: layout.state == "kana" ? ["は", "ひ", "ふ", "へ", "ほ"] : ["m", "n", "o", ")", "6"]; annotation: layout.state == "kana" ? "" : "6)"; } - CursorKey { action: "right"; } + CursorKey { rightSide:true; } } Row { @@ -108,7 +109,7 @@ KeyPad { leaves: layout.state == "kana" ? ["わ", "を", "ん", "ー"] : ["-", "+", "0", "*"]; annotation: layout.state == "kana" ? "" : "0"; } - DomainKey { + StringKey { label: layout.state == "kana" ? "、。" : ". ,"; leaves: layout.state == "kana" ? ["、", "。", "!", "?"] : [".", ",", ".com", ".jp"]; diff --git a/plugins/ja/qml/Keyboard_ja_url.qml b/plugins/ja/qml/Keyboard_ja_url.qml index 7bcae8d22..ff0894872 100644 --- a/plugins/ja/qml/Keyboard_ja_url.qml +++ b/plugins/ja/qml/Keyboard_ja_url.qml @@ -26,6 +26,7 @@ KeyPad { Column { id: c1 anchors.fill: parent + property int keyHeight: panel.keyHeight; spacing: 0 Row { @@ -55,7 +56,7 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { action: "left"; } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "kana" ? "た" : "GHI"; leaves: layout.state == "kana" ? ["た", "ち", "つ", "て", "と"] : ["g", "h", "i", "(", "4"]; @@ -71,7 +72,7 @@ KeyPad { leaves: layout.state == "kana" ? ["は", "ひ", "ふ", "へ", "ほ"] : ["m", "n", "o", ")", "6"]; annotation: layout.state == "kana" ? "" : "6)"; } - CursorKey { action: "right"; } + CursorKey { rightSide:true; } } Row { @@ -108,7 +109,7 @@ KeyPad { leaves: layout.state == "kana" ? ["わ", "を", "ん", "ー"] : ["-", "+", "0", "*"]; annotation: layout.state == "kana" ? "" : "0"; } - DomainKey { + StringKey { label: layout.state == "kana" ? "、。" : ". ,"; leaves: layout.state == "kana" ? ["、", "。", "!", "?"] : [".", ",", ".com", ".jp"]; diff --git a/plugins/ja/qml/Keyboard_ja_url_search.qml b/plugins/ja/qml/Keyboard_ja_url_search.qml index 7bcae8d22..ff0894872 100644 --- a/plugins/ja/qml/Keyboard_ja_url_search.qml +++ b/plugins/ja/qml/Keyboard_ja_url_search.qml @@ -26,6 +26,7 @@ KeyPad { Column { id: c1 anchors.fill: parent + property int keyHeight: panel.keyHeight; spacing: 0 Row { @@ -55,7 +56,7 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { action: "left"; } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "kana" ? "た" : "GHI"; leaves: layout.state == "kana" ? ["た", "ち", "つ", "て", "と"] : ["g", "h", "i", "(", "4"]; @@ -71,7 +72,7 @@ KeyPad { leaves: layout.state == "kana" ? ["は", "ひ", "ふ", "へ", "ほ"] : ["m", "n", "o", ")", "6"]; annotation: layout.state == "kana" ? "" : "6)"; } - CursorKey { action: "right"; } + CursorKey { rightSide:true; } } Row { @@ -108,7 +109,7 @@ KeyPad { leaves: layout.state == "kana" ? ["わ", "を", "ん", "ー"] : ["-", "+", "0", "*"]; annotation: layout.state == "kana" ? "" : "0"; } - DomainKey { + StringKey { label: layout.state == "kana" ? "、。" : ". ,"; leaves: layout.state == "kana" ? ["、", "。", "!", "?"] : [".", ",", ".com", ".jp"]; diff --git a/plugins/ja/qml/keys/KanaSwitchKey.qml b/plugins/ja/qml/keys/KanaSwitchKey.qml index c5fae267c..1ce8438ba 100644 --- a/plugins/ja/qml/keys/KanaSwitchKey.qml +++ b/plugins/ja/qml/keys/KanaSwitchKey.qml @@ -18,8 +18,7 @@ import QtQuick 2.4 import QtMultimedia 5.0 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 - -import "key_constants.js" as UI +import keys 1.0 FlickCharKey { padding: UI.actionKeyPadding diff --git a/plugins/ja/qml/keys/ModifierKey.qml b/plugins/ja/qml/keys/ModifierKey.qml index 17b4258b5..005562374 100644 --- a/plugins/ja/qml/keys/ModifierKey.qml +++ b/plugins/ja/qml/keys/ModifierKey.qml @@ -18,10 +18,8 @@ import QtQuick 2.4 import QtMultimedia 5.0 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 - import "modifier.js" as Modifier -import "key_constants.js" as UI - +import keys 1.0 FlickCharKey { label: (isPreedit && layoutState == "kana") ? " ゛ ゜" : "␣" leaves: isPreedit ? preeditLeaves : ["␣", "□"] diff --git a/plugins/plugins.pro b/plugins/plugins.pro index 524f3a6d1..9e7aa978a 100644 --- a/plugins/plugins.pro +++ b/plugins/plugins.pro @@ -14,6 +14,7 @@ SUBDIRS = \ el \ en \ en@dv \ + en@flick \ eo \ es \ fa \ diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml new file mode 100644 index 000000000..6b087222f --- /dev/null +++ b/qml/keys/CaseSwitchKey.qml @@ -0,0 +1,108 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import QtMultimedia 5.0 +import Ubuntu.Components 1.3 +import Ubuntu.Components.Popups 1.3 + +import "key_constants.js" as UI + +FlickCharKey { + padding: UI.actionKeyPadding + label: isPreedit ? "A⇔a" : kana.label + leaves: isPreedit ? ["A⇔a", "", "🖱", "␣","↵"]:["↻", "", "A", "␣", "a"] + annotation: "␣" + normalColor: fullScreenItem.theme.actionKeyColor + pressedColor: fullScreenItem.theme.actionKeyPressedColor + borderColor: fullScreenItem.theme.actionKeyBorderColor + + overridePressArea: true + + property string preedit: maliit_input_method.preedit + property bool isPreedit: maliit_input_method.preedit.length > 0 + property string default_state: "qertyu" + property int cursorPosition: maliit_input_method.cursorPosition + property string lastChar: "" + property var preeditLeaves: [lastChar] + state:(panel.autoCapsTriggered)?"caps": kana.state + + Item { + id: kana + property string label: "A/a" + + state: parent.default_state; + states: [ + State { + name: "caps" + PropertyChanges { + target: kana; + label: "A/a"; + state: "caps"; + } + }, + State { + name: "qertyu" + PropertyChanges { + target: kana; + label: "a/A"; + state: "qertyu"; + } + } + ] + } + + onReleased: { + if (isPreedit) { + if (index != 0) { + if (index == 2) fullScreenItem.cursorSwipe=true + if (index == 3) event_handler.onKeyReleased("", "space"); + if (index == 4) event_handler.onKeyReleased("", "return"); + } else { + var pos = cursorPosition + var newChar = lastChar.charCodeAt(0) < 91 ? lastChar.toLowerCase() : lastChar.toUpperCase() + maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) + maliit_input_method.cursorPosition = pos + } + }else{ + if (index == 0) { + kana.state = kana.state == "caps" ? "qertyu" : "caps" + } else if (index == 2) { + kana.state = "caps" + } else if (index == 3) { + event_handler.onKeyReleased("", "space"); + } + else if (index == 4) { + kana.state = "qertyu" + } + } + if(panel.autoCapsTriggered){ + panel.autoCapsTriggered=false; + kana.state = "qertyu" + } + } + + onPressed: { + if (maliit_input_method.useAudioFeedback) + audioFeedback.play(); + + if (maliit_input_method.useHapticFeedback) + pressEffect.start(); + if (isPreedit) { + lastChar = preedit.charAt(cursorPosition-1) + } + } +} diff --git a/qml/keys/CharKey.qml b/qml/keys/CharKey.qml index db6983fd7..31a8d4648 100644 --- a/qml/keys/CharKey.qml +++ b/qml/keys/CharKey.qml @@ -134,7 +134,7 @@ Item { // maintaining the same visual appearance. Item { anchors.top: parent.top - height: panel.keyHeight + height: parent.height width: parent.width Rectangle { diff --git a/plugins/ja/qml/keys/CursorKey.qml b/qml/keys/CursorKey.qml similarity index 90% rename from plugins/ja/qml/keys/CursorKey.qml rename to qml/keys/CursorKey.qml index 569344545..598459edc 100644 --- a/plugins/ja/qml/keys/CursorKey.qml +++ b/qml/keys/CursorKey.qml @@ -19,10 +19,10 @@ import "key_constants.js" as UI import keys 1.0 ActionKey { - label: action == "left" ? "⬅" : "➡"; - leftSide: action == "left"; - rightSide: action == "right"; - + label: leftSide ? "⬅" : "➡"; + shifted:label; + action: leftSide ? "left" : "right"; + height:layout.height; property string preedit: maliit_input_method.preedit property int cursorPosition: maliit_input_method.cursorPosition property bool isPreedit: preedit != "" @@ -53,6 +53,6 @@ ActionKey { } onPressAndHold: { - return; + fullScreenItem.cursorSwipe=true } } diff --git a/plugins/ja/qml/keys/FlickArea.qml b/qml/keys/FlickArea.qml similarity index 100% rename from plugins/ja/qml/keys/FlickArea.qml rename to qml/keys/FlickArea.qml diff --git a/plugins/ja/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml similarity index 94% rename from plugins/ja/qml/keys/FlickCharKey.qml rename to qml/keys/FlickCharKey.qml index 18b232e63..ae4116852 100644 --- a/plugins/ja/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -25,10 +25,10 @@ Item { id: key property int padding: 0 - + width: leftSide || rightSide ? panel.keyWidth * 2 : panel.keyWidth - height: panel.keyHeight - + height: c1.keyHeight + /* to be set in keyboard layouts */ property string label: ""; property var leaves: ["", "", "", "", ""]; @@ -36,7 +36,7 @@ Item { property bool highlight: false; property string action - property bool noMagnifier: !maliit_input_method.enableMagnifier + property bool noMagnifier: true property bool skipAutoCaps: false property bool switchBackFromSymbols: false @@ -83,7 +83,7 @@ Item { // maintaining the same visual appearance. Item { anchors.top: parent.top - height: panel.keyHeight + height: parent.height width: parent.width Rectangle { @@ -141,7 +141,7 @@ Item { height: units.gu((UI.fontSize + UI.flickMargin) * 3) chars: leaves index: keyFlickArea.index - visible: key.currentlyPressed && chars.length > 1 && !noMagnifier + visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false } } @@ -154,9 +154,12 @@ Item { key.released(); return; } - - event_handler.onKeyReleased(leaves[index], action); - } + event_handler.onKeyReleased(leaves[index], action); + if(panel.autoCapsTriggered){ + panel.autoCapsTriggered=false; + } + + } onPressed: { if (overridePressArea) { diff --git a/plugins/ja/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml similarity index 100% rename from plugins/ja/qml/keys/FlickPop.qml rename to qml/keys/FlickPop.qml diff --git a/plugins/ja/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml similarity index 100% rename from plugins/ja/qml/keys/FlickPopKey.qml rename to qml/keys/FlickPopKey.qml diff --git a/plugins/ja/qml/keys/DomainKey.qml b/qml/keys/StringKey.qml similarity index 100% rename from plugins/ja/qml/keys/DomainKey.qml rename to qml/keys/StringKey.qml diff --git a/qml/keys/key_constants.js b/qml/keys/key_constants.js index 40123b8cf..18ed215bb 100644 --- a/qml/keys/key_constants.js +++ b/qml/keys/key_constants.js @@ -87,3 +87,15 @@ var tabletKeyboardHeightLandscape = 0.34; // percent of screen /* for UITK Components */ var toolkitTheme = "Ubuntu.Components.Themes.Ambiance" + +/* ActionKey layout */ +var undoFontSize = 2; + +/* FlickCharKey layout */ +var annotationFontSize = 1.5; // gu +var annotationMargins = 0.3; // gu + +/* FlickPop layout */ +var flickMargin = 1.5 // gu +var flickBorderWidth = 0.1 // gu +var flickBorderColor = "#999999" diff --git a/qml/keys/languages.js b/qml/keys/languages.js index 0d8e90922..b0a3484af 100644 --- a/qml/keys/languages.js +++ b/qml/keys/languages.js @@ -28,6 +28,7 @@ function languageIdToName(languageId) if (languageId == "el") return i18n.tr("Greek"); if (languageId == "en") return i18n.tr("English"); if (languageId == "en@dv") return i18n.tr("English\n(Dvorak)"); + if (languageId == "en@flick") return i18n.tr("English (Flick)"); if (languageId == "eo") return i18n.tr("Esperanto"); if (languageId == "es") return i18n.tr("Spanish"); if (languageId == "fa") return i18n.tr("Persian"); diff --git a/qml/keys/qmldir b/qml/keys/qmldir index 4bf0b5e22..3e18dfb54 100644 --- a/qml/keys/qmldir +++ b/qml/keys/qmldir @@ -18,3 +18,11 @@ PressArea 1.0 PressArea.qml SpaceKey 1.0 SpaceKey.qml UrlKey 1.0 UrlKey.qml UI 1.0 key_constants.js +CommitKey 1.0 CommitKey.qml +CaseSwitchKey 1.0 CaseSwitchKey.qml +FlickCharKey 1.0 FlickCharKey.qml +FlickArea 1.0 FlickArea.qml +FlickPop 1.0 FlickPop.qml +FlickPopKey 1.0 FlickPopKey.qml +CursorKey 1.0 CursorKey.qml +StringKey 1.0 StringKey.qml From af72d2f7128dd4d75620749c89026372a33e15d3 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Mon, 16 Sep 2019 01:30:45 -0300 Subject: [PATCH 02/57] alter caps button --- qml/keys/CaseSwitchKey.qml | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 6b087222f..3020bbd2a 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -22,19 +22,17 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI FlickCharKey { + borderColor: fullScreenItem.theme.actionKeyBorderColor padding: UI.actionKeyPadding - label: isPreedit ? "A⇔a" : kana.label - leaves: isPreedit ? ["A⇔a", "", "🖱", "␣","↵"]:["↻", "", "A", "␣", "a"] + label: isPreedit ? "Aa" : kana.label + leaves: ["A/a", "", "A", "␣", "a"] annotation: "␣" - normalColor: fullScreenItem.theme.actionKeyColor - pressedColor: fullScreenItem.theme.actionKeyPressedColor - borderColor: fullScreenItem.theme.actionKeyBorderColor overridePressArea: true property string preedit: maliit_input_method.preedit property bool isPreedit: maliit_input_method.preedit.length > 0 - property string default_state: "qertyu" + property string default_state:"qertyu" property int cursorPosition: maliit_input_method.cursorPosition property string lastChar: "" property var preeditLeaves: [lastChar] @@ -42,9 +40,9 @@ FlickCharKey { Item { id: kana - property string label: "A/a" state: parent.default_state; + property string label: "C" states: [ State { name: "caps" @@ -58,7 +56,7 @@ FlickCharKey { name: "qertyu" PropertyChanges { target: kana; - label: "a/A"; + label: (panel.autoCapsTriggered)?"A/a": "a/A"; state: "qertyu"; } } @@ -67,29 +65,28 @@ FlickCharKey { onReleased: { if (isPreedit) { - if (index != 0) { - if (index == 2) fullScreenItem.cursorSwipe=true + if (index != 2&& index !=4) { if (index == 3) event_handler.onKeyReleased("", "space"); - if (index == 4) event_handler.onKeyReleased("", "return"); } else { var pos = cursorPosition - var newChar = lastChar.charCodeAt(0) < 91 ? lastChar.toLowerCase() : lastChar.toUpperCase() - maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) - maliit_input_method.cursorPosition = pos - } - }else{ + var newChar = (lastChar.charCodeAt(0) >= 91 && index == 2) ? lastChar.toUpperCase() : lastChar + newChar = (lastChar.charCodeAt(0) < 91 && index == 4) ? lastChar.toLowerCase() : newChar + maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) + maliit_input_method.cursorPosition = pos + } + }else{ if (index == 0) { - kana.state = kana.state == "caps" ? "qertyu" : "caps" - } else if (index == 2) { - kana.state = "caps" - } else if (index == 3) { - event_handler.onKeyReleased("", "space"); + //kana.state = kana.state == "caps" ? "qertyu" : "caps" + } else if (index == 2) { + kana.state = "caps" + } else if (index == 3) { + event_handler.onKeyReleased("", "space"); } else if (index == 4) { kana.state = "qertyu" } } - if(panel.autoCapsTriggered){ + if(panel.autoCapsTriggered && index != 0){ panel.autoCapsTriggered=false; kana.state = "qertyu" } From 4bd7a703e50703fb743d7943f18e6e0846269d7b Mon Sep 17 00:00:00 2001 From: fuseteam Date: Mon, 16 Sep 2019 01:31:30 -0300 Subject: [PATCH 03/57] improve cursorkey labels --- qml/keys/CursorKey.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/keys/CursorKey.qml b/qml/keys/CursorKey.qml index 598459edc..18b518df4 100644 --- a/qml/keys/CursorKey.qml +++ b/qml/keys/CursorKey.qml @@ -19,7 +19,7 @@ import "key_constants.js" as UI import keys 1.0 ActionKey { - label: leftSide ? "⬅" : "➡"; + label: leftSide ? "←" : "→"; shifted:label; action: leftSide ? "left" : "right"; height:layout.height; From 28f2a1bf08fd40105bf57ef5d583938e4a43f317 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Mon, 16 Sep 2019 01:31:54 -0300 Subject: [PATCH 04/57] hide all labels in cursor mode --- qml/keys/FlickCharKey.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index ae4116852..7759dcdc5 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -108,7 +108,7 @@ Item { Text { id: keyLabel - text: label + text:(panel.hideKeyLabels)?"":label anchors.horizontalCenter: parent.horizontalCenter font.family: UI.fontFamily font.pixelSize: fontSize @@ -119,7 +119,7 @@ Item { Text { id: annotationLabel - text: annotation + text: (panel.hideKeyLabels)?"":annotation anchors.horizontalCenter: parent.horizontalCenter anchors.bottomMargin: units.gu( UI.annotationMargins ) From 48d57b6e4b3c23d51b5407e4d3e4b2bca8cad60d Mon Sep 17 00:00:00 2001 From: fuseteam Date: Mon, 16 Sep 2019 01:32:11 -0300 Subject: [PATCH 05/57] improve layout based on feedback --- plugins/en@flick/qml/Keyboard_en@flick.qml | 24 +++++++++---------- .../en@flick/qml/Keyboard_en@flick_email.qml | 24 +++++++++---------- .../en@flick/qml/Keyboard_en@flick_url.qml | 24 +++++++++---------- .../qml/Keyboard_en@flick_url_search.qml | 24 +++++++++---------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index aa85d6b85..4ddb3cc6f 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -54,7 +54,11 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { leftSide:true} + FlickCharKey { + label: layout.state == "caps" ? "!_" : "!_" + leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; @@ -70,18 +74,18 @@ KeyPad { leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; annotation: layout.state == "caps" ? "6J" : "6j"; } - CursorKey { rightSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "&`" : "&`" + leaves: layout.state == "caps" ? [";", "&", "`", "", "~"] : [";", "&", "`", "", "~"] + annotation: layout.state == "caps" ? ";~" : ";~" + } } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - FlickCharKey { - label: layout.state == "caps" ? "`_" : "`_" - leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" - } + CursorKey { leftSide:true} FlickCharKey { label: layout.state == "caps" ? "ZXC" : "zxc" leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] @@ -97,11 +101,7 @@ KeyPad { leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] annotation: layout.state == "caps" ? "9/" : "9/" } - FlickCharKey { - label: layout.state == "caps" ? "&!" : "&!" - leaves: layout.state == "caps" ? [";", "&", "!", "", "~"] : [";", "&", "!", "", "~"] - annotation: layout.state == "caps" ? ";~" : ";~" - } + CursorKey { rightSide:true; } } Row { diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 94113f528..a33ef4cc0 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -52,7 +52,11 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "!_" : "!_" + leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; @@ -68,18 +72,18 @@ KeyPad { leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; annotation: layout.state == "caps" ? "6J" : "6j"; } - CursorKey { rightSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "&`" : "&`" + leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - FlickCharKey { - label: layout.state == "caps" ? "`_" : "`_" - leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" - } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "caps" ? "ZXC" : "zxc" leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] @@ -95,11 +99,7 @@ KeyPad { leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] annotation: layout.state == "caps" ? "9/" : "9/" } - FlickCharKey { - label: layout.state == "caps" ? "&!" : "&!" - leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" - } + CursorKey { rightSide:true; } } Row { diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index 360264877..75f3879a9 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -54,7 +54,11 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "!_" : "!_" + leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; @@ -70,18 +74,18 @@ KeyPad { leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; annotation: layout.state == "caps" ? "6J" : "6j"; } - CursorKey { rightSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "&`" : "&`" + leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - FlickCharKey { - label: layout.state == "caps" ? "`_" : "`_" - leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" - } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "caps" ? "ZXC" : "zxc" leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] @@ -97,11 +101,7 @@ KeyPad { leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] annotation: layout.state == "caps" ? "9/" : "9/" } - FlickCharKey { - label: layout.state == "caps" ? "&!" : "&!" - leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" - } + CursorKey { rightSide:true; } } Row { diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index 6fcb0deb5..a7d602e98 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -54,7 +54,11 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CursorKey { leftSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "!_" : "!_" + leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] + annotation: layout.state == "caps" ? "=|" : "=|" + } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; @@ -70,18 +74,18 @@ KeyPad { leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; annotation: layout.state == "caps" ? "6J" : "6j"; } - CursorKey { rightSide:true; } + FlickCharKey { + label: layout.state == "caps" ? "&`" : "&`" + leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] + annotation: layout.state == "caps" ? "@~" : "@~" + } } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - FlickCharKey { - label: layout.state == "caps" ? "`_" : "`_" - leaves: layout.state == "caps" ? ["=", "", "`", "_", "|"] : ["=", "", "`", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" - } + CursorKey { leftSide:true; } FlickCharKey { label: layout.state == "caps" ? "ZXC" : "zxc" leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] @@ -97,11 +101,7 @@ KeyPad { leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] annotation: layout.state == "caps" ? "9/" : "9/" } - FlickCharKey { - label: layout.state == "caps" ? "&!" : "&!" - leaves: layout.state == "caps" ? ["@", "&", "!", "", "~"] : ["@", "&", "!", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" - } + CursorKey { rightSide:true; } } Row { From b04074b3a43a888810b3c4007b03a84c76bcc27c Mon Sep 17 00:00:00 2001 From: fuseteam Date: Tue, 17 Sep 2019 11:18:35 -0300 Subject: [PATCH 06/57] final tweaks layout --- qml/keys/CaseSwitchKey.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 3020bbd2a..65ee3739f 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -24,8 +24,8 @@ import "key_constants.js" as UI FlickCharKey { borderColor: fullScreenItem.theme.actionKeyBorderColor padding: UI.actionKeyPadding - label: isPreedit ? "Aa" : kana.label - leaves: ["A/a", "", "A", "␣", "a"] + label: isPreedit ? ""+kana.label+"" : kana.label + leaves: ["⎄", "", "A", "␣", "a"] annotation: "␣" overridePressArea: true From 8b908a5d50cb7a38065e0659833a20c270b94d70 Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Sat, 16 Nov 2019 15:43:15 -0300 Subject: [PATCH 07/57] more tweaks and bug fixes (#8) tweaked the overall layout fixed minor bug with cursor key --- qml/keys/CaseSwitchKey.qml | 10 ++++--- qml/keys/FlickCharKey.qml | 60 +++++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 65ee3739f..28191e872 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -22,7 +22,6 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI FlickCharKey { - borderColor: fullScreenItem.theme.actionKeyBorderColor padding: UI.actionKeyPadding label: isPreedit ? ""+kana.label+"" : kana.label leaves: ["⎄", "", "A", "␣", "a"] @@ -42,13 +41,15 @@ FlickCharKey { id: kana state: parent.default_state; - property string label: "C" + property string label: ""; + property string annotation:""; states: [ State { name: "caps" PropertyChanges { target: kana; - label: "A/a"; + label: ""; + annotation:"ⓐ"; state: "caps"; } }, @@ -56,7 +57,8 @@ FlickCharKey { name: "qertyu" PropertyChanges { target: kana; - label: (panel.autoCapsTriggered)?"A/a": "a/A"; + label: (panel.autoCapsTriggered)?"": "Ⓐ"; + annotation:(panel.autoCapsTriggered)?"ⓐ":""; state: "qertyu"; } } diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 7759dcdc5..783037c27 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -105,32 +105,72 @@ Item { Column { spacing: units.gu( UI.annotationMargins ) anchors.centerIn: parent - + Text { + id: topLabel + text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) + anchors.right: (labelright)?parent.right:""; + anchors.left: (labelleft)?parent.left:""; + anchors.horizontalCenter: (labelleft||labelright)?"":parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } Text { id: keyLabel - text:(panel.hideKeyLabels)?"":label + text: (panel.hideKeyLabels)?"":(label!=""?label:charlabel[1]+charlabel[4]+botlabel+charlabel[3]) anchors.horizontalCenter: parent.horizontalCenter font.family: UI.fontFamily font.pixelSize: fontSize - font.weight: Font.Light + font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText + visible: label!="" + } + Text{ + id: annotationLabel + text: (panel.hideKeyLabels)?"":annotation + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: units.gu( UI.annotationMargins ) + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" } + } Text { id: annotationLabel text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter anchors.bottomMargin: units.gu( UI.annotationMargins ) - - font.family: UI.annotationFont - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.annotationFontColor - visible: annotation != "" + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" } } + Column { + spacing: units.gu( UI.annotationMargins ) + anchors.left: parent.left + Text { + id: tapLabel + text: (panel.hideKeyLabels)?"":charlabel[0] + anchors.horizontalCenter: parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.selectionColor + textFormat: Text.StyledText + } + + } + } FlickPop { From d67b32e2355ed502f2a2f22ff3f681bad354204b Mon Sep 17 00:00:00 2001 From: Danfro Date: Mon, 18 Nov 2019 06:15:52 +0100 Subject: [PATCH 08/57] apply cross shaped layout and fix keys overlapping in landscape mode --- qml/keys/FlickCharKey.qml | 150 ++++++++++++++++++++++++++------------ 1 file changed, 102 insertions(+), 48 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 783037c27..38a36a460 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -102,31 +102,48 @@ Item { /// label of the key // the label is also the value subitted to the app - Column { - spacing: units.gu( UI.annotationMargins ) - anchors.centerIn: parent - Text { - id: topLabel - text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) - anchors.right: (labelright)?parent.right:""; - anchors.left: (labelleft)?parent.left:""; - anchors.horizontalCenter: (labelleft||labelright)?"":parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + RowLayout { + id: tapLeftTopCol + anchors.left: parent.left + spacing: 0 + + ColumnLayout { + id: tapColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Text { + id: tapLabel + text: (panel.hideKeyLabels)?"":charlabel[0] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.selectionColor + textFormat: Text.StyledText + } } - Text { - id: keyLabel - text: (panel.hideKeyLabels)?"":(label!=""?label:charlabel[1]+charlabel[4]+botlabel+charlabel[3]) - anchors.horizontalCenter: parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: label!="" + + ColumnLayout { + id: leftColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Text { + id: middleLeftLabel + text: (panel.hideKeyLabels)?"":charlabel[1] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } } Text{ id: annotationLabel @@ -142,35 +159,72 @@ Item { } } - Text { - id: annotationLabel - text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: units.gu( UI.annotationMargins ) - font.family: UI.fontFamily - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: annotation != "" + ColumnLayout { + id: topColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Text { + id: topCenterLabel + text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } } } - Column { - spacing: units.gu( UI.annotationMargins ) - anchors.left: parent.left - Text { - id: tapLabel - text: (panel.hideKeyLabels)?"":charlabel[0] - anchors.horizontalCenter: parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.selectionColor - textFormat: Text.StyledText + + RowLayout { + id: bottomRightCol + anchors.right: parent.right + spacing: 0 + + ColumnLayout { + id: bottomColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignBottom + spacing: 0 + + Text { + id: bottomCenterLabel + text: (panel.hideKeyLabels)?"":charlabel[4]+botlabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } } - } + ColumnLayout { + id: rightColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + Text { + id: middleRightLabel + text: (panel.hideKeyLabels)?"":charlabel[3] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } + } + } } FlickPop { From c104f16cec33ecf76e515d598d8594b8ecb2a91a Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Tue, 19 Nov 2019 14:50:12 -0300 Subject: [PATCH 09/57] fixed japanese layout regression --- qml/keys/FlickCharKey.qml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 38a36a460..aef7b2d9c 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -101,6 +101,33 @@ Item { /// label of the key // the label is also the value subitted to the app + Column { + spacing: units.gu( UI.annotationsMargins ) + anchors.centerIn: parent + Text { + id: keyLabel + text: (panel.hideKeyLabels)?"":label + anchors.horizontalCenter: parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: label!="" + } + Text{ + id: annotationLabel + text: (panel.hideKeyLabels)?"":annotation + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: units.gu( UI.annotationMargins ) + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" + } + } RowLayout { id: tapLeftTopCol From 7c4a6b6161deef206faefa9754bf0fec4f7b5f1d Mon Sep 17 00:00:00 2001 From: fuseteam Date: Fri, 22 Nov 2019 15:34:34 -0300 Subject: [PATCH 10/57] basis for FlickActionKeys kudos to Johannes Renkl --- qml/keys/CaseSwitchKey.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 28191e872..a3adedf29 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -21,7 +21,9 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI -FlickCharKey { +FlickActionKey { + iconSourceNormal:kana.icon + iconSourceShifted:kana.icon padding: UI.actionKeyPadding label: isPreedit ? ""+kana.label+"" : kana.label leaves: ["⎄", "", "A", "␣", "a"] @@ -43,12 +45,14 @@ FlickCharKey { state: parent.default_state; property string label: ""; property string annotation:""; + property string icon:""; states: [ State { name: "caps" PropertyChanges { target: kana; label: ""; + icon:"../images/keyboard-caps-locked.svg" annotation:"ⓐ"; state: "caps"; } @@ -58,6 +62,7 @@ FlickCharKey { PropertyChanges { target: kana; label: (panel.autoCapsTriggered)?"": "Ⓐ"; + icon:"../images/keyboard-caps-disabled.svg" annotation:(panel.autoCapsTriggered)?"ⓐ":""; state: "qertyu"; } From 22f51ed4df9bb68c8840a789ed39fb81fb7798e9 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Tue, 26 Nov 2019 15:33:35 -0300 Subject: [PATCH 11/57] get the positioning of the 5 icon right, kudos to Daniel Frost --- qml/keys/CaseSwitchKey.qml | 25 +++- qml/keys/FlickActionKey.qml | 230 ++++++++++++++++++++++++++++++++++++ 2 files changed, 250 insertions(+), 5 deletions(-) create mode 100644 qml/keys/FlickActionKey.qml diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index a3adedf29..546d446f0 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -22,12 +22,15 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI FlickActionKey { - iconSourceNormal:kana.icon + iconSourceUp:kana.iconUp + iconSourceDown:kana.iconDown + iconSourceLeft:kana.iconLeft + iconSourceRight:kana.iconRight + iconSource:kana.icon iconSourceShifted:kana.icon padding: UI.actionKeyPadding - label: isPreedit ? ""+kana.label+"" : kana.label - leaves: ["⎄", "", "A", "␣", "a"] - annotation: "␣" + charlabel: ["↵", "␣", "", "", ""] + leaves: kana.state=="caps"?["↵", "␣", "", ""/*"⎄"*/, "ⓐ"]:["↵", "␣", "Ⓐ", "", ""] overridePressArea: true @@ -46,13 +49,21 @@ FlickActionKey { property string label: ""; property string annotation:""; property string icon:""; + property string iconUp:""; + property string iconDown:""; + property string iconLeft:""; + property string iconRight:""; states: [ State { name: "caps" PropertyChanges { target: kana; label: ""; - icon:"../images/keyboard-caps-locked.svg" + iconUp:"../images/keyboard-caps-locked.svg" + iconDown:"../images/keyboard-caps-disabled.svg" + iconLeft:"../images/keyboard-caps-disabled.svg" + iconRight:"../images/keyboard-caps-disabled.svg" + icon:"../images/keyboard-caps-disabled.svg" annotation:"ⓐ"; state: "caps"; } @@ -62,7 +73,11 @@ FlickActionKey { PropertyChanges { target: kana; label: (panel.autoCapsTriggered)?"": "Ⓐ"; + iconUp:"../images/keyboard-caps-disabled.svg" + iconDown:"../images/keyboard-caps-locked.svg" icon:"../images/keyboard-caps-disabled.svg" + iconLeft:"../images/keyboard-caps-disabled.svg" + iconRight:"../images/keyboard-caps-disabled.svg" annotation:(panel.autoCapsTriggered)?"ⓐ":""; state: "qertyu"; } diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml new file mode 100644 index 000000000..2a310f975 --- /dev/null +++ b/qml/keys/FlickActionKey.qml @@ -0,0 +1,230 @@ +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 + +import Ubuntu.Components 1.3 + +import "key_constants.js" as UI + +FlickCharKey { + id: actionKeyRoot + property string iconNormal: "" + property string iconShifted: "" + property string iconCapsLock: "" + + property string iconSource: "" + property string iconSourceUp: "" + property string iconSourceLeft: "" + property string iconSourceRight: "" + property string iconSourceDown: "" + property string iconSourceShifted: "" + property string iconSourceCapsLock: "" + + noMagnifier: true + skipAutoCaps: true + property int padding: UI.actionKeyPadding + + width: panel.keyWidth + + normalColor: fullScreenItem.theme.charKeyColor + pressedColor: fullScreenItem.theme.actionKeyPressedColor + borderColor: fullScreenItem.theme.actionKeyBorderColor + + // can be overwritten by keys + property color colorNormal: fullScreenItem.theme.fontColor + property color colorShifted: fullScreenItem.theme.fontColor + property color colorCapsLock: fullScreenItem.theme.fontColor + + // Make it possible for the visible area of the key to differ from the + // actual key size. This allows us to extend the touch area of the bottom + // row of keys all the way to the bottom of the keyboard, whilst + // maintaining the same visual appearance. + Item { + anchors.top: parent.top + height: c1.keyHeight + width: panel.keyWidth + + Rectangle { + id: buttonRect + color: key.currentlyPressed || key.highlight ? pressedColor : normalColor + anchors.fill: parent + anchors.leftMargin: key.leftSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin + anchors.rightMargin: key.rightSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin + anchors.bottomMargin: key.rowMargin + radius: units.dp(4) + border{ + width: borderEnabled ? units.gu(0.1) : 0 + color: borderColor + } + + /// label of the key + // the label is also the value subitted to the app + RowLayout { + id: tapLeftTopCol + anchors.left: parent.left + spacing: 0 + + ColumnLayout { + id: tapColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Icon { + id: iconImage + source: iconSource !== "" ? iconSource + : iconNormal ? "image://theme/%1".arg(iconNormal) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + visible: (label == "" && !panel.hideKeyLabels) + height: actionKeyRoot.fontSize + width: height + } + } + + ColumnLayout { + id: leftColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Icon { + id: iconImageLeft + source: iconSourceLeft !== "" ? iconSourceLeft + : iconNormal ? "image://theme/%1".arg(iconNormal) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + visible: (label == "" && !panel.hideKeyLabels) + height: actionKeyRoot.fontSize + width: height + } + } + + ColumnLayout { + id: topColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Icon { + id: iconImageUp + source: iconSourceUp !== "" ? iconSourceUp + : iconNormal ? "image://theme/%1".arg(iconNormal) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + + visible: (label == "" && !panel.hideKeyLabels) + height: actionKeyRoot.fontSize + width: height + } + } + } + + RowLayout { + id: bottomRightCol + anchors.right: parent.right + spacing: 0 + + ColumnLayout { + id: bottomColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignBottom + spacing: 0 + + Icon { + id: iconImageDown + source: iconSourceDown !== "" ? iconSourceDown + : iconNormal ? "image://theme/%1".arg(iconNormal) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + visible: (label == "" && !panel.hideKeyLabels) + height: actionKeyRoot.fontSize + width: height + } + } + + ColumnLayout { + id: rightColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Icon { + id: iconImageRight + source: iconSourceRight !== "" ? iconSourceRight + : iconNormal ? "image://theme/%1".arg(iconNormal) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Icon.AlignHCenter + visible: (label == "" && !panel.hideKeyLabels) + height: actionKeyRoot.fontSize + width: height + } + } + } + } + + FlickPop { + anchors.horizontalCenter: buttonRect.horizontalCenter + anchors.bottom: buttonRect.top + anchors.bottomMargin: key.height * 0.5 + width: units.gu((UI.fontSize + UI.flickMargin) * 3) + height: units.gu((UI.fontSize + UI.flickMargin) * 3) + chars: leaves + index: keyFlickArea.index + visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false + } + } + + // make sure the icon changes even if the property icon* change on runtime + state: panel.activeKeypadState + states: [ + State { + name: "caps" + PropertyChanges { + target: iconImage + source: iconSourceShifted !== "" ? iconSourceShifted + : iconShifted ? "image://theme/%1".arg(iconShifted) + : "" + color: actionKeyRoot.colorShifted + } + }, + State { + name: "CAPSLOCK" + PropertyChanges { + target: iconImage + source: iconSourceCapsLock !== "" ? iconSourceCapsLock + : iconCapsLock ? "image://theme/%1".arg(iconCapsLock) + : "" + color: actionKeyRoot.colorCapsLock + } + } + ] +} From 5ab828ad53e06ba725555baa3951ce70627c6424 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Sun, 1 Dec 2019 01:35:06 -0300 Subject: [PATCH 12/57] fix alignment and sizing --- qml/keys/CaseSwitchKey.qml | 32 +--- qml/keys/FlickActionKey.qml | 336 +++++++++++++++++++----------------- 2 files changed, 176 insertions(+), 192 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 546d446f0..f199b97ee 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -22,15 +22,8 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI FlickActionKey { - iconSourceUp:kana.iconUp - iconSourceDown:kana.iconDown - iconSourceLeft:kana.iconLeft - iconSourceRight:kana.iconRight - iconSource:kana.icon - iconSourceShifted:kana.icon - padding: UI.actionKeyPadding - charlabel: ["↵", "␣", "", "", ""] - leaves: kana.state=="caps"?["↵", "␣", "", ""/*"⎄"*/, "ⓐ"]:["↵", "␣", "Ⓐ", "", ""] + iconNormal:["keyboard-enter", "keyboard-caps-disabled", "keyboard-caps-disabled", "keyboard-caps-disabled", "keyboard-caps-locked"] + iconShifted:["keyboard-enter", "keyboard-caps-disabled", "keyboard-caps-locked", "keyboard-caps-disabled", "keyboard-caps-disabled"] overridePressArea: true @@ -46,25 +39,11 @@ FlickActionKey { id: kana state: parent.default_state; - property string label: ""; - property string annotation:""; - property string icon:""; - property string iconUp:""; - property string iconDown:""; - property string iconLeft:""; - property string iconRight:""; states: [ State { name: "caps" PropertyChanges { target: kana; - label: ""; - iconUp:"../images/keyboard-caps-locked.svg" - iconDown:"../images/keyboard-caps-disabled.svg" - iconLeft:"../images/keyboard-caps-disabled.svg" - iconRight:"../images/keyboard-caps-disabled.svg" - icon:"../images/keyboard-caps-disabled.svg" - annotation:"ⓐ"; state: "caps"; } }, @@ -72,13 +51,6 @@ FlickActionKey { name: "qertyu" PropertyChanges { target: kana; - label: (panel.autoCapsTriggered)?"": "Ⓐ"; - iconUp:"../images/keyboard-caps-disabled.svg" - iconDown:"../images/keyboard-caps-locked.svg" - icon:"../images/keyboard-caps-disabled.svg" - iconLeft:"../images/keyboard-caps-disabled.svg" - iconRight:"../images/keyboard-caps-disabled.svg" - annotation:(panel.autoCapsTriggered)?"ⓐ":""; state: "qertyu"; } } diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml index 2a310f975..cf0647acd 100644 --- a/qml/keys/FlickActionKey.qml +++ b/qml/keys/FlickActionKey.qml @@ -16,29 +16,30 @@ import QtQuick 2.4 +import QtMultimedia 5.0 import Ubuntu.Components 1.3 +import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI +import QtQuick.Layouts 1.1 FlickCharKey { id: actionKeyRoot - property string iconNormal: "" - property string iconShifted: "" - property string iconCapsLock: "" - - property string iconSource: "" - property string iconSourceUp: "" - property string iconSourceLeft: "" - property string iconSourceRight: "" - property string iconSourceDown: "" - property string iconSourceShifted: "" + property var iconNormal: ["", "", "", "", ""]; + property var iconShifted: ["", "", "", "", ""]; + property string iconCapsLock: ["", "", "", "", ""]; + + property var iconSource: ["", "", "", "", ""]; + property var iconleaves: ["", "", "", "", ""]; + property var iconsleaves: ["", "", "", "", ""]; property string iconSourceCapsLock: "" + padding: UI.actionKeyPadding noMagnifier: true skipAutoCaps: true - property int padding: UI.actionKeyPadding - width: panel.keyWidth + height: c1.keyHeight; + width: panel.keyWidth normalColor: fullScreenItem.theme.charKeyColor pressedColor: fullScreenItem.theme.actionKeyPressedColor @@ -48,160 +49,164 @@ FlickCharKey { property color colorNormal: fullScreenItem.theme.fontColor property color colorShifted: fullScreenItem.theme.fontColor property color colorCapsLock: fullScreenItem.theme.fontColor + property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); // Make it possible for the visible area of the key to differ from the // actual key size. This allows us to extend the touch area of the bottom // row of keys all the way to the bottom of the keyboard, whilst // maintaining the same visual appearance. - Item { - anchors.top: parent.top - height: c1.keyHeight - width: panel.keyWidth - - Rectangle { - id: buttonRect - color: key.currentlyPressed || key.highlight ? pressedColor : normalColor - anchors.fill: parent - anchors.leftMargin: key.leftSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin - anchors.rightMargin: key.rightSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin - anchors.bottomMargin: key.rowMargin - radius: units.dp(4) - border{ - width: borderEnabled ? units.gu(0.1) : 0 - color: borderColor - } - - /// label of the key - // the label is also the value subitted to the app - RowLayout { - id: tapLeftTopCol - anchors.left: parent.left - spacing: 0 - - ColumnLayout { - id: tapColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Icon { - id: iconImage - source: iconSource !== "" ? iconSource - : iconNormal ? "image://theme/%1".arg(iconNormal) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter - visible: (label == "" && !panel.hideKeyLabels) - height: actionKeyRoot.fontSize - width: height - } - } - - ColumnLayout { - id: leftColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Icon { - id: iconImageLeft - source: iconSourceLeft !== "" ? iconSourceLeft - : iconNormal ? "image://theme/%1".arg(iconNormal) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter - visible: (label == "" && !panel.hideKeyLabels) - height: actionKeyRoot.fontSize - width: height - } - } - - ColumnLayout { - id: topColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Icon { - id: iconImageUp - source: iconSourceUp !== "" ? iconSourceUp - : iconNormal ? "image://theme/%1".arg(iconNormal) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter - - visible: (label == "" && !panel.hideKeyLabels) - height: actionKeyRoot.fontSize - width: height + Item { + anchors.top: parent.top + height: parent.height + width: parent.width + + Rectangle { + id: buttonRect + color: actionKeyRoot.currentlyPressed || actionKeyRoot.highlight ? pressedColor : normalColor + anchors.fill: parent + anchors.leftMargin: actionKeyRoot.leftSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin + anchors.rightMargin: actionKeyRoot.rightSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin + anchors.bottomMargin: actionKeyRoot.rowMargin + radius: units.dp(4) + border{ + width: borderEnabled ? units.gu(0.1) : 0 + color: borderColor + } + + /// label of the key + // the label is also the value subitted to the app + RowLayout { + id: tapLeftTopCol + anchors.left: parent.left + spacing: 0 + + ColumnLayout { + id: tapColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Icon { + id: iconImage + source: iconSource[0] !== "" ? iconSource[0] + : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) + : "" + color: fullScreenItem.theme.selectionColor + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + visible: (charlabel[0] == "" && !panel.hideKeyLabels) + height: fontSize + width: height + } + } + + ColumnLayout { + id: leftColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Icon { + id: iconImageLeft + source: iconSource[1] !== "" ? iconSource[1] + : iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + visible: (charlabel[1] == "" && !panel.hideKeyLabels) + height: fontSize + width: height } - } - } - - RowLayout { - id: bottomRightCol - anchors.right: parent.right - spacing: 0 - - ColumnLayout { - id: bottomColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignBottom - spacing: 0 - - Icon { - id: iconImageDown - source: iconSourceDown !== "" ? iconSourceDown - : iconNormal ? "image://theme/%1".arg(iconNormal) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) - visible: (label == "" && !panel.hideKeyLabels) - height: actionKeyRoot.fontSize - width: height + } + + ColumnLayout { + id: topColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Icon { + id: iconImageUp + source: iconSource[2] !== "" ? iconSource[2] + : iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + + visible: (charlabel[2] == "" && !panel.hideKeyLabels) + height: fontSize + width: height + } + } + } + + RowLayout { + id: bottomRightCol + anchors.right: parent.right + spacing: 0 + + ColumnLayout { + id: bottomColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignBottom + spacing: 0 + + Icon { + id: iconImageDown + source: iconSource[4] !== "" ? iconSource[4] + : iconNormal[4] ? "image://theme/%1".arg(iconNormal[4]) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Text.AlignHCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + visible: (charlabel[4] == "" && !panel.hideKeyLabels) + height: fontSize + width: height + } + } + + ColumnLayout { + id: rightColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Icon { + id: iconImageRight + source: iconSource[3] !== "" ? iconSource[3] + : iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + //horizontalAlignment: Icon.AlignHCenter + visible: (charlabel[3] == "" && !panel.hideKeyLabels) + height: fontSize + width: height + } + } + } } - } - - ColumnLayout { - id: rightColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Icon { - id: iconImageRight - source: iconSourceRight !== "" ? iconSourceRight - : iconNormal ? "image://theme/%1".arg(iconNormal) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Icon.AlignHCenter - visible: (label == "" && !panel.hideKeyLabels) - height: actionKeyRoot.fontSize - width: height + + FlickPop { + anchors.horizontalCenter: buttonRect.horizontalCenter + anchors.bottom: buttonRect.top + anchors.bottomMargin: actionKeyRoot.height * 0.5 + width: units.gu((UI.fontSize + UI.flickMargin) * 3) + height: units.gu((UI.fontSize + UI.flickMargin) * 3) + chars: leaves + icons:iconleaves + iconSources:iconsleaves + index: keyFlickArea.index + visible:(maliit_input_method.enableMagnifier)? actionKeyRoot.currentlyPressed && chars.length > 1:false } - } - } - } - - FlickPop { - anchors.horizontalCenter: buttonRect.horizontalCenter - anchors.bottom: buttonRect.top - anchors.bottomMargin: key.height * 0.5 - width: units.gu((UI.fontSize + UI.flickMargin) * 3) - height: units.gu((UI.fontSize + UI.flickMargin) * 3) - chars: leaves - index: keyFlickArea.index - visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false - } - } + } + // make sure the icon changes even if the property icon* change on runtime state: panel.activeKeypadState @@ -209,9 +214,16 @@ FlickCharKey { State { name: "caps" PropertyChanges { - target: iconImage - source: iconSourceShifted !== "" ? iconSourceShifted - : iconShifted ? "image://theme/%1".arg(iconShifted) + target: iconImageUp + source: iconSource[2] !== "" ? iconSource[2] + : iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) + : "" + color: actionKeyRoot.colorShifted + } + PropertyChanges { + target: iconImageDown + source: iconSource[4] !== "" ? iconSource[4] + : iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) : "" color: actionKeyRoot.colorShifted } @@ -219,7 +231,7 @@ FlickCharKey { State { name: "CAPSLOCK" PropertyChanges { - target: iconImage + target: iconImageUp source: iconSourceCapsLock !== "" ? iconSourceCapsLock : iconCapsLock ? "image://theme/%1".arg(iconCapsLock) : "" From 62e454fc2384c6ad4bee409915e5bdc52b39dff1 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Sun, 1 Dec 2019 01:37:02 -0300 Subject: [PATCH 13/57] set basis for icons in flickPop --- qml/keys/FlickPop.qml | 13 +++++++++++++ qml/keys/FlickPopKey.qml | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index 99268db1e..a639faa68 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -28,6 +28,8 @@ Item { id: root property var chars + property var icons + property var iconSources property int index: 0 visible: false @@ -35,12 +37,17 @@ Item { FlickPopKey { id: center labelChar: chars[0] + labelIcon:icons[0] + labelIconSource:iconSources[0] anchors.centerIn: parent labelOpacity: index == 0 ? 1.0 : 0.6 labelColor: index == 0 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } FlickPopKey { labelChar: chars[1] ? chars[1] : "" + labelIcon:icons[1] ? icons[1] : "" + labelIconSource:iconSources[1] ? iconSources[1] : "" + anchors.verticalCenter: center.verticalCenter anchors.right: center.left labelOpacity: index == 1 ? 1.0 : 0.6 @@ -48,6 +55,8 @@ Item { } FlickPopKey { labelChar: chars[2] ? chars[2] : "" + labelIcon:icons[2] ? icons[2] : "" + labelIconSource:iconSources[2] ? iconSources[2] : "" anchors.horizontalCenter: center.horizontalCenter anchors.bottom: center.top labelOpacity: index == 2 ? 1.0 : 0.6 @@ -55,6 +64,8 @@ Item { } FlickPopKey { labelChar: chars[3] ? chars[3] : "" + labelIcon:icons[3] ? icons[3] : "" + labelIconSource:iconSources[3] ? iconSources[3] : "" anchors.verticalCenter: center.verticalCenter anchors.left: center.right labelOpacity: index == 3 ? 1.0 : 0.6 @@ -62,6 +73,8 @@ Item { } FlickPopKey { labelChar: chars[4] ? chars[4] : "" + labelIcon:icons[4] ? icons[4] : "" + labelIconSource:iconSources[4] ? iconSources[4] : "" anchors.horizontalCenter: center.horizontalCenter anchors.top: center.bottom labelOpacity: index == 4 ? 1.0 : 0.6 diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index 095d7d790..88e5b70ed 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -22,9 +22,11 @@ Rectangle { height: units.gu(UI.fontSize + UI.flickMargin) property string labelChar + property string labelIcon + property string labelIconSource property color labelColor: fullScreenItem.theme.fontColor property real labelOpacity: 1.0 - visible: labelChar ? true : false + visible: labelChar || labelIcon? true : false color: fullScreenItem.theme.charKeyColor border.width: units.gu(UI.flickBorderWidth) @@ -40,4 +42,9 @@ Rectangle { color: parent.labelColor opacity: parent.labelOpacity } + /*Icon { + anchors.centerIn: parent + source: "image://theme/%1".arg(parent.labelIcon) + color: parent.labelColor + }*/ } From f9fa0c03018713fd9b65290e221b12da8b6850a9 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Sun, 1 Dec 2019 02:12:22 -0300 Subject: [PATCH 14/57] push correct version for commit 51a6eea2 --- qml/keys/FlickActionKey.qml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml index cf0647acd..32c0bd431 100644 --- a/qml/keys/FlickActionKey.qml +++ b/qml/keys/FlickActionKey.qml @@ -30,7 +30,6 @@ FlickCharKey { property string iconCapsLock: ["", "", "", "", ""]; property var iconSource: ["", "", "", "", ""]; - property var iconleaves: ["", "", "", "", ""]; property var iconsleaves: ["", "", "", "", ""]; property string iconSourceCapsLock: "" @@ -49,7 +48,7 @@ FlickCharKey { property color colorNormal: fullScreenItem.theme.fontColor property color colorShifted: fullScreenItem.theme.fontColor property color colorCapsLock: fullScreenItem.theme.fontColor - property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); + property int fontSize: isPortrait ? buttonRect.width/4 : buttonRect.width/6 // Make it possible for the visible area of the key to differ from the // actual key size. This allows us to extend the touch area of the bottom @@ -199,8 +198,7 @@ FlickCharKey { anchors.bottomMargin: actionKeyRoot.height * 0.5 width: units.gu((UI.fontSize + UI.flickMargin) * 3) height: units.gu((UI.fontSize + UI.flickMargin) * 3) - chars: leaves - icons:iconleaves + icons:iconNormal iconSources:iconsleaves index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? actionKeyRoot.currentlyPressed && chars.length > 1:false @@ -227,13 +225,27 @@ FlickCharKey { : "" color: actionKeyRoot.colorShifted } + PropertyChanges { + target: iconImageLeft + source: iconSource[1] !== "" ? iconSource[1] + : iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) + : "" + color: actionKeyRoot.colorShifted + } + PropertyChanges { + target: iconImageRight + source: iconSource[3] !== "" ? iconSource[3] + : iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) + : "" + color: actionKeyRoot.colorShifted + } }, State { name: "CAPSLOCK" PropertyChanges { target: iconImageUp source: iconSourceCapsLock !== "" ? iconSourceCapsLock - : iconCapsLock ? "image://theme/%1".arg(iconCapsLock) + : iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) : "" color: actionKeyRoot.colorCapsLock } From 5fdefdef972f3234515a81ada1e180f33f84d536 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Tue, 18 Feb 2020 15:38:38 -0300 Subject: [PATCH 15/57] fix flickpopkey --- qml/keys/CaseSwitchKey.qml | 4 ++-- qml/keys/FlickActionKey.qml | 19 +++++++------------ qml/keys/FlickPopKey.qml | 7 +++++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index f199b97ee..52901ec8b 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -22,8 +22,8 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI FlickActionKey { - iconNormal:["keyboard-enter", "keyboard-caps-disabled", "keyboard-caps-disabled", "keyboard-caps-disabled", "keyboard-caps-locked"] - iconShifted:["keyboard-enter", "keyboard-caps-disabled", "keyboard-caps-locked", "keyboard-caps-disabled", "keyboard-caps-disabled"] + iconNormal:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-disabled", "", "keyboard-caps-locked"] + iconShifted:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-locked", "", "keyboard-caps-disabled"] overridePressArea: true diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml index 32c0bd431..81980c488 100644 --- a/qml/keys/FlickActionKey.qml +++ b/qml/keys/FlickActionKey.qml @@ -38,7 +38,7 @@ FlickCharKey { skipAutoCaps: true height: c1.keyHeight; - width: panel.keyWidth + width: panel.keyWidth normalColor: fullScreenItem.theme.charKeyColor pressedColor: fullScreenItem.theme.actionKeyPressedColor @@ -92,7 +92,6 @@ FlickCharKey { : "" color: fullScreenItem.theme.selectionColor anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter visible: (charlabel[0] == "" && !panel.hideKeyLabels) height: fontSize width: height @@ -113,7 +112,6 @@ FlickCharKey { : "" color: actionKeyRoot.colorNormal anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter visible: (charlabel[1] == "" && !panel.hideKeyLabels) height: fontSize width: height @@ -133,7 +131,6 @@ FlickCharKey { : "" color: actionKeyRoot.colorNormal anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter visible: (charlabel[2] == "" && !panel.hideKeyLabels) height: fontSize @@ -160,7 +157,6 @@ FlickCharKey { : "" color: actionKeyRoot.colorNormal anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Text.AlignHCenter anchors.bottom: parent.bottom anchors.bottomMargin: units.gu(0.25) visible: (charlabel[4] == "" && !panel.hideKeyLabels) @@ -183,7 +179,6 @@ FlickCharKey { : "" color: actionKeyRoot.colorNormal anchors.horizontalCenter: parent.horizontalCenter - //horizontalAlignment: Icon.AlignHCenter visible: (charlabel[3] == "" && !panel.hideKeyLabels) height: fontSize width: height @@ -199,12 +194,12 @@ FlickCharKey { width: units.gu((UI.fontSize + UI.flickMargin) * 3) height: units.gu((UI.fontSize + UI.flickMargin) * 3) icons:iconNormal - iconSources:iconsleaves + //iconSources:iconsleaves index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? actionKeyRoot.currentlyPressed && chars.length > 1:false } } - + // make sure the icon changes even if the property icon* change on runtime state: panel.activeKeypadState @@ -213,28 +208,28 @@ FlickCharKey { name: "caps" PropertyChanges { target: iconImageUp - source: iconSource[2] !== "" ? iconSource[2] + source: iconSource[2] !== "" ? iconSource[2] : iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) : "" color: actionKeyRoot.colorShifted } PropertyChanges { target: iconImageDown - source: iconSource[4] !== "" ? iconSource[4] + source: iconSource[4] !== "" ? iconSource[4] : iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) : "" color: actionKeyRoot.colorShifted } PropertyChanges { target: iconImageLeft - source: iconSource[1] !== "" ? iconSource[1] + source: iconSource[1] !== "" ? iconSource[1] : iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) : "" color: actionKeyRoot.colorShifted } PropertyChanges { target: iconImageRight - source: iconSource[3] !== "" ? iconSource[3] + source: iconSource[3] !== "" ? iconSource[3] : iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) : "" color: actionKeyRoot.colorShifted diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index 88e5b70ed..c4c0459de 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -15,6 +15,8 @@ */ import QtQuick 2.4 +import QtMultimedia 5.0 +import Ubuntu.Components 1.3 import "key_constants.js" as UI Rectangle { @@ -42,9 +44,10 @@ Rectangle { color: parent.labelColor opacity: parent.labelOpacity } - /*Icon { + Icon { anchors.centerIn: parent source: "image://theme/%1".arg(parent.labelIcon) color: parent.labelColor - }*/ + opacity: parent.labelOpacity + } } From c1e5b5f515d11bac6dd0b2a6bfd775d0a90f19ac Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 19 Feb 2020 00:39:16 -0300 Subject: [PATCH 16/57] fix sizing Stringkey --- plugins/en@flick/qml/Keyboard_en@flick_email.qml | 12 ++++-------- plugins/en@flick/qml/Keyboard_en@flick_url.qml | 10 +++------- .../en@flick/qml/Keyboard_en@flick_url_search.qml | 8 +++----- qml/keys/StringKey.qml | 1 + 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index a33ef4cc0..720411adf 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -117,14 +117,10 @@ KeyPad { leaves: layout.state == "caps" ? ["0", "'", "^", "\"","%"] : ["0", "'", "^", "\"","%"]; annotation: layout.state == "caps" ? "0%" : "0%"; } - StringKey { - label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; - leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : - [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; - annotation: layout.state == "caps" ? "." : ".net" - } - CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} + StringKey { + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } } // column diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index 75f3879a9..80fad1b1d 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -120,13 +120,9 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; - leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : - [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; - annotation: layout.state == "caps" ? "." : ".net" - } - CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } } // column diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index a7d602e98..0e454fa27 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -120,11 +120,9 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - label: layout.state == "caps" ? "{ ? }" : ".io .com .org"; - leaves: layout.state == "caps" ? [".", "{", "?", "}", ";"] : - [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: layout.state == "caps" ? [".", "{", "?", "}",";"] : [".", ".io", ".com", ".org",".net"]; - annotation: layout.state == "caps" ? "." : ".net" + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; + unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} } diff --git a/qml/keys/StringKey.qml b/qml/keys/StringKey.qml index f5d54c96d..8184bf633 100644 --- a/qml/keys/StringKey.qml +++ b/qml/keys/StringKey.qml @@ -26,6 +26,7 @@ FlickCharKey { overridePressArea: true + fontSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) onReleased: { event_handler.onKeyReleased(unstyledLeaves[index], action); } From 3f8b2c79367b477db87361831fd499884e8e744b Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 19 Feb 2020 21:43:44 -0300 Subject: [PATCH 17/57] fix qml icon errors --- qml/keys/FlickPop.qml | 6 +++--- qml/keys/FlickPopKey.qml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index a639faa68..345914b85 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -27,9 +27,9 @@ import "key_constants.js" as UI Item { id: root - property var chars - property var icons - property var iconSources + property var chars: ["", "", "", "", ""]; + property var icons: ["", "", "", "", ""]; + property var iconSources: ["", "", "", "", ""]; property int index: 0 visible: false diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index c4c0459de..3a84272ac 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -46,7 +46,7 @@ Rectangle { } Icon { anchors.centerIn: parent - source: "image://theme/%1".arg(parent.labelIcon) + source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" color: parent.labelColor opacity: parent.labelOpacity } From 2e0ce28ecd32406b23442e1d5eae0b5f9e158d75 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Thu, 20 Feb 2020 13:40:27 -0300 Subject: [PATCH 18/57] fixed Popup on Flickaction --- qml/keys/CaseSwitchKey.qml | 4 +- qml/keys/FlickActionKey.qml | 132 +++++++++++++++++++----------------- qml/keys/FlickPop.qml | 5 ++ qml/keys/FlickPopKey.qml | 4 ++ 4 files changed, 80 insertions(+), 65 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 52901ec8b..578a1a9b3 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -30,11 +30,11 @@ FlickActionKey { property string preedit: maliit_input_method.preedit property bool isPreedit: maliit_input_method.preedit.length > 0 property string default_state:"qertyu" - property int cursorPosition: maliit_input_method.cursorPosition + property int cursorPosition: maliit_input_method.cursorPosition property string lastChar: "" property var preeditLeaves: [lastChar] state:(panel.autoCapsTriggered)?"caps": kana.state - + Item { id: kana diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml index 81980c488..726f47ab7 100644 --- a/qml/keys/FlickActionKey.qml +++ b/qml/keys/FlickActionKey.qml @@ -15,14 +15,14 @@ */ import QtQuick 2.4 - import QtMultimedia 5.0 import Ubuntu.Components 1.3 - import Ubuntu.Components.Popups 1.3 -import "key_constants.js" as UI import QtQuick.Layouts 1.1 +import "key_constants.js" as UI + + FlickCharKey { id: actionKeyRoot property var iconNormal: ["", "", "", "", ""]; @@ -54,68 +54,68 @@ FlickCharKey { // actual key size. This allows us to extend the touch area of the bottom // row of keys all the way to the bottom of the keyboard, whilst // maintaining the same visual appearance. - Item { - anchors.top: parent.top - height: parent.height - width: parent.width - - Rectangle { - id: buttonRect - color: actionKeyRoot.currentlyPressed || actionKeyRoot.highlight ? pressedColor : normalColor - anchors.fill: parent - anchors.leftMargin: actionKeyRoot.leftSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin - anchors.rightMargin: actionKeyRoot.rightSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin - anchors.bottomMargin: actionKeyRoot.rowMargin - radius: units.dp(4) - border{ - width: borderEnabled ? units.gu(0.1) : 0 - color: borderColor - } - - /// label of the key - // the label is also the value subitted to the app - RowLayout { - id: tapLeftTopCol - anchors.left: parent.left - spacing: 0 - - ColumnLayout { - id: tapColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 - Layout.alignment : Qt.AlignTop - spacing: 0 + Item { + anchors.top: parent.top + height: parent.height + width: parent.width + + Rectangle { + id: buttonRect + color: actionKeyRoot.currentlyPressed || actionKeyRoot.highlight ? pressedColor : normalColor + anchors.fill: parent + anchors.leftMargin: actionKeyRoot.leftSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin + anchors.rightMargin: actionKeyRoot.rightSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin + anchors.bottomMargin: actionKeyRoot.rowMargin + radius: units.dp(4) + border{ + width: borderEnabled ? units.gu(0.1) : 0 + color: borderColor + } - Icon { - id: iconImage - source: iconSource[0] !== "" ? iconSource[0] - : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) - : "" - color: fullScreenItem.theme.selectionColor - anchors.horizontalCenter: parent.horizontalCenter - visible: (charlabel[0] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } + /// label of the key + // the label is also the value subitted to the app + RowLayout { + id: tapLeftTopCol + anchors.left: parent.left + spacing: 0 + + ColumnLayout { + id: tapColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Icon { + id: iconImage + source: iconSource[0] !== "" ? iconSource[0] + : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) + : "" + color: fullScreenItem.theme.selectionColor + anchors.horizontalCenter: parent.horizontalCenter + visible: (charlabel[0] == "" && !panel.hideKeyLabels) + height: fontSize + width: height } - - ColumnLayout { - id: leftColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Icon { - id: iconImageLeft - source: iconSource[1] !== "" ? iconSource[1] - : iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - visible: (charlabel[1] == "" && !panel.hideKeyLabels) - height: fontSize - width: height } + + ColumnLayout { + id: leftColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Icon { + id: iconImageLeft + source: iconSource[1] !== "" ? iconSource[1] + : iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) + : "" + color: actionKeyRoot.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + visible: (charlabel[1] == "" && !panel.hideKeyLabels) + height: fontSize + width: height + } } ColumnLayout { @@ -188,6 +188,7 @@ FlickCharKey { } FlickPop { + id : flickPop anchors.horizontalCenter: buttonRect.horizontalCenter anchors.bottom: buttonRect.top anchors.bottomMargin: actionKeyRoot.height * 0.5 @@ -206,7 +207,12 @@ FlickCharKey { states: [ State { name: "caps" - PropertyChanges { + + PropertyChanges { + target: flickPop + icons:iconShifted + } + PropertyChanges { target: iconImageUp source: iconSource[2] !== "" ? iconSource[2] : iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index 345914b85..272e41884 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -43,6 +43,7 @@ Item { labelOpacity: index == 0 ? 1.0 : 0.6 labelColor: index == 0 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } + FlickPopKey { labelChar: chars[1] ? chars[1] : "" labelIcon:icons[1] ? icons[1] : "" @@ -53,6 +54,7 @@ Item { labelOpacity: index == 1 ? 1.0 : 0.6 labelColor: index == 1 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } + FlickPopKey { labelChar: chars[2] ? chars[2] : "" labelIcon:icons[2] ? icons[2] : "" @@ -62,6 +64,7 @@ Item { labelOpacity: index == 2 ? 1.0 : 0.6 labelColor: index == 2 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } + FlickPopKey { labelChar: chars[3] ? chars[3] : "" labelIcon:icons[3] ? icons[3] : "" @@ -71,6 +74,7 @@ Item { labelOpacity: index == 3 ? 1.0 : 0.6 labelColor: index == 3 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } + FlickPopKey { labelChar: chars[4] ? chars[4] : "" labelIcon:icons[4] ? icons[4] : "" @@ -78,6 +82,7 @@ Item { anchors.horizontalCenter: center.horizontalCenter anchors.top: center.bottom labelOpacity: index == 4 ? 1.0 : 0.6 + labelAngle: 180 labelColor: index == 4 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } } diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index 3a84272ac..ec0cbf54b 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -28,6 +28,7 @@ Rectangle { property string labelIconSource property color labelColor: fullScreenItem.theme.fontColor property real labelOpacity: 1.0 + property int labelAngle: 0 visible: labelChar || labelIcon? true : false color: fullScreenItem.theme.charKeyColor @@ -49,5 +50,8 @@ Rectangle { source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" color: parent.labelColor opacity: parent.labelOpacity + transform: Rotation { origin.x:fontSize/2; origin.y:fontSize/2; angle:labelAngle} + height: fontSize + width: height } } From 92f614f55a90ea6d49c39da9608c60835f9e6f3c Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Mon, 27 Apr 2020 01:55:52 -0300 Subject: [PATCH 19/57] clean up old code --- qml/keys/FlickCharKey.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index aef7b2d9c..74b30cc1c 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -192,9 +192,21 @@ Item { Layout.alignment : Qt.AlignTop spacing: 0 + Icon { + id: iconImageUp + source: iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) + : "" + color: key.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + + visible: (iconNormal[2] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + } + Text { id: topCenterLabel - text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) + text: (panel.hideKeyLabels)?"":charlabel[2] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily @@ -219,7 +231,7 @@ Item { Text { id: bottomCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[4]+botlabel + text: (panel.hideKeyLabels)?"":charlabel[4] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter anchors.bottom: parent.bottom From 5a04117ebe4fd7b63aa25b4ab23166f89327065d Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Mon, 27 Apr 2020 01:56:35 -0300 Subject: [PATCH 20/57] merge flickactionkey into flickcharkey make icons rotatable improve icon support flickcharkey other tweaks and bug fixes tweaked the overall layout fixed minor bug with cursor key --- .../en@flick/qml/Keyboard_en@flick_email.qml | 4 +- .../en@flick/qml/Keyboard_en@flick_url.qml | 4 +- .../qml/Keyboard_en@flick_url_search.qml | 4 +- qml/keys/CaseSwitchKey.qml | 19 +- qml/keys/FlickActionKey.qml | 255 ------------------ qml/keys/FlickCharKey.qml | 235 +++++++--------- qml/keys/FlickPop.qml | 17 +- qml/keys/FlickPopKey.qml | 7 +- 8 files changed, 136 insertions(+), 409 deletions(-) delete mode 100644 qml/keys/FlickActionKey.qml diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 720411adf..79fa81cc7 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -118,8 +118,8 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index 80fad1b1d..d75bb281f 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -120,8 +120,8 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index 0e454fa27..6c2f53cc7 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -120,8 +120,8 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; + charlabel: [".", ".io", ".com", ".org",".net"]; + leaves: [".", ".io", ".com", ".org",".net"]; unstyledLeaves: [".", ".io", ".com", ".org",".net"]; } CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 578a1a9b3..94d72cae9 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -21,9 +21,12 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI -FlickActionKey { - iconNormal:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-disabled", "", "keyboard-caps-locked"] - iconShifted:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-locked", "", "keyboard-caps-disabled"] +FlickCharKey { + padding: UI.actionKeyPadding + toplabel:kana.label + botlabel:kana.annotation + charlabel: ["↵", "␣", "", "", ""] + leaves: kana.state=="caps"?["↵", "␣", "", ""/*"⎄"*/, "ⓐ"]:["↵", "␣", "Ⓐ", "", ""] overridePressArea: true @@ -39,11 +42,15 @@ FlickActionKey { id: kana state: parent.default_state; + property string label: ""; + property string annotation:""; states: [ State { name: "caps" PropertyChanges { target: kana; + label: ""; + annotation:"ⓐ"; state: "caps"; } }, @@ -51,6 +58,8 @@ FlickActionKey { name: "qertyu" PropertyChanges { target: kana; + label: (panel.autoCapsTriggered)?"": "Ⓐ"; + annotation:(panel.autoCapsTriggered)?"ⓐ":""; state: "qertyu"; } } @@ -84,6 +93,10 @@ FlickActionKey { panel.autoCapsTriggered=false; kana.state = "qertyu" } + if(panel.autoCapsTriggered && index ==2){ + panel.autoCapsTriggered=false; + kana.state = "caps" + } } onPressed: { diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml deleted file mode 100644 index 726f47ab7..000000000 --- a/qml/keys/FlickActionKey.qml +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2013 Canonical Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.4 -import QtMultimedia 5.0 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import QtQuick.Layouts 1.1 - -import "key_constants.js" as UI - - -FlickCharKey { - id: actionKeyRoot - property var iconNormal: ["", "", "", "", ""]; - property var iconShifted: ["", "", "", "", ""]; - property string iconCapsLock: ["", "", "", "", ""]; - - property var iconSource: ["", "", "", "", ""]; - property var iconsleaves: ["", "", "", "", ""]; - property string iconSourceCapsLock: "" - - padding: UI.actionKeyPadding - noMagnifier: true - skipAutoCaps: true - - height: c1.keyHeight; - width: panel.keyWidth - - normalColor: fullScreenItem.theme.charKeyColor - pressedColor: fullScreenItem.theme.actionKeyPressedColor - borderColor: fullScreenItem.theme.actionKeyBorderColor - - // can be overwritten by keys - property color colorNormal: fullScreenItem.theme.fontColor - property color colorShifted: fullScreenItem.theme.fontColor - property color colorCapsLock: fullScreenItem.theme.fontColor - property int fontSize: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - - // Make it possible for the visible area of the key to differ from the - // actual key size. This allows us to extend the touch area of the bottom - // row of keys all the way to the bottom of the keyboard, whilst - // maintaining the same visual appearance. - Item { - anchors.top: parent.top - height: parent.height - width: parent.width - - Rectangle { - id: buttonRect - color: actionKeyRoot.currentlyPressed || actionKeyRoot.highlight ? pressedColor : normalColor - anchors.fill: parent - anchors.leftMargin: actionKeyRoot.leftSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin - anchors.rightMargin: actionKeyRoot.rightSide ? (parent.width - panel.keyWidth) + actionKeyRoot.keyMargin : actionKeyRoot.keyMargin - anchors.bottomMargin: actionKeyRoot.rowMargin - radius: units.dp(4) - border{ - width: borderEnabled ? units.gu(0.1) : 0 - color: borderColor - } - - /// label of the key - // the label is also the value subitted to the app - RowLayout { - id: tapLeftTopCol - anchors.left: parent.left - spacing: 0 - - ColumnLayout { - id: tapColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Icon { - id: iconImage - source: iconSource[0] !== "" ? iconSource[0] - : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) - : "" - color: fullScreenItem.theme.selectionColor - anchors.horizontalCenter: parent.horizontalCenter - visible: (charlabel[0] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } - } - - ColumnLayout { - id: leftColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Icon { - id: iconImageLeft - source: iconSource[1] !== "" ? iconSource[1] - : iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - visible: (charlabel[1] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } - } - - ColumnLayout { - id: topColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Icon { - id: iconImageUp - source: iconSource[2] !== "" ? iconSource[2] - : iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - - visible: (charlabel[2] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } - } - } - - RowLayout { - id: bottomRightCol - anchors.right: parent.right - spacing: 0 - - ColumnLayout { - id: bottomColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignBottom - spacing: 0 - - Icon { - id: iconImageDown - source: iconSource[4] !== "" ? iconSource[4] - : iconNormal[4] ? "image://theme/%1".arg(iconNormal[4]) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) - visible: (charlabel[4] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } - } - - ColumnLayout { - id: rightColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Icon { - id: iconImageRight - source: iconSource[3] !== "" ? iconSource[3] - : iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) - : "" - color: actionKeyRoot.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - visible: (charlabel[3] == "" && !panel.hideKeyLabels) - height: fontSize - width: height - } - } - } - } - - FlickPop { - id : flickPop - anchors.horizontalCenter: buttonRect.horizontalCenter - anchors.bottom: buttonRect.top - anchors.bottomMargin: actionKeyRoot.height * 0.5 - width: units.gu((UI.fontSize + UI.flickMargin) * 3) - height: units.gu((UI.fontSize + UI.flickMargin) * 3) - icons:iconNormal - //iconSources:iconsleaves - index: keyFlickArea.index - visible:(maliit_input_method.enableMagnifier)? actionKeyRoot.currentlyPressed && chars.length > 1:false - } - } - - - // make sure the icon changes even if the property icon* change on runtime - state: panel.activeKeypadState - states: [ - State { - name: "caps" - - PropertyChanges { - target: flickPop - icons:iconShifted - } - PropertyChanges { - target: iconImageUp - source: iconSource[2] !== "" ? iconSource[2] - : iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) - : "" - color: actionKeyRoot.colorShifted - } - PropertyChanges { - target: iconImageDown - source: iconSource[4] !== "" ? iconSource[4] - : iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) - : "" - color: actionKeyRoot.colorShifted - } - PropertyChanges { - target: iconImageLeft - source: iconSource[1] !== "" ? iconSource[1] - : iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) - : "" - color: actionKeyRoot.colorShifted - } - PropertyChanges { - target: iconImageRight - source: iconSource[3] !== "" ? iconSource[3] - : iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) - : "" - color: actionKeyRoot.colorShifted - } - }, - State { - name: "CAPSLOCK" - PropertyChanges { - target: iconImageUp - source: iconSourceCapsLock !== "" ? iconSourceCapsLock - : iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) - : "" - color: actionKeyRoot.colorCapsLock - } - } - ] -} diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 74b30cc1c..e3f63cf8d 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -31,6 +31,8 @@ Item { /* to be set in keyboard layouts */ property string label: ""; + property string toplabel: ""; + property string botlabel: ""; property var leaves: ["", "", "", "", ""]; property int index: keyFlickArea.index; property bool highlight: false; @@ -54,12 +56,39 @@ Item { readonly property double leftOffset: buttonRect.anchors.leftMargin readonly property double rightOffset: buttonRect.anchors.rightMargin + /* icons */ + property var iconNormal: ["", "", "", "", ""]; + property var iconShifted: ["", "", "", "", ""]; + property var iconCapsLock: ["", "", "", "", ""]; + property var iconCaps: [ + "", + iconCapsLock[1] ? "image://theme/%1".arg(iconCapsLock[1]) : "", + iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) : "", + iconCapsLock[3] ? "image://theme/%1".arg(iconCapsLock[3]) : "", + iconCapsLock[4] ? "image://theme/%1".arg(iconCapsLock[4]) : "" + ]; + property var iconAutoCaps: [ + "", + iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) : "", + iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) : "", + iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) : "", + iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) : "" + ]; + + property color colorNormal: fullScreenItem.theme.fontColor + property color colorShifted: fullScreenItem.theme.fontColor + property color colorCapsLock: fullScreenItem.theme.fontColor + + property var iconAngles: ["", "", "", "", ""]; + /* design */ property string normalColor: fullScreenItem.theme.charKeyColor property string pressedColor: fullScreenItem.theme.charKeyPressedColor property bool borderEnabled: fullScreenItem.theme.keyBorderEnabled property string borderColor: borderEnabled ? fullScreenItem.theme.charKeyBorderColor : "transparent" property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); + property int iconSize: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + property bool isPortrait: buttonRect.width/buttonRect.height > 2 ? false : true /// annotation shows a small label in the upper right corner // if the annotiation property is set, it will be used. If not, the first position in extended[] list or extendedShifted[] list will @@ -104,13 +133,25 @@ Item { Column { spacing: units.gu( UI.annotationsMargins ) anchors.centerIn: parent + Text { + id: topLabel + text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) + anchors.right: (labelright)?parent.right:""; + anchors.left: (labelleft)?parent.left:""; + anchors.horizontalCenter: (labelleft||labelright)?"":parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } Text { id: keyLabel - text: (panel.hideKeyLabels)?"":label + text: (panel.hideKeyLabels)?"":(label!=""?label:charlabel[1]+charlabel[4]+botlabel+charlabel[3]) anchors.horizontalCenter: parent.horizontalCenter font.family: UI.fontFamily font.pixelSize: fontSize - font.weight: Font.Light + font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText visible: label!="" @@ -129,150 +170,47 @@ Item { } } - RowLayout { - id: tapLeftTopCol - anchors.left: parent.left - spacing: 0 - - ColumnLayout { - id: tapColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Text { - id: tapLabel - text: (panel.hideKeyLabels)?"":charlabel[0] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.selectionColor - textFormat: Text.StyledText - } - } - - ColumnLayout { - id: leftColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Text { - id: middleLeftLabel - text: (panel.hideKeyLabels)?"":charlabel[1] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - } - } - Text{ - id: annotationLabel - text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: units.gu( UI.annotationMargins ) - font.family: UI.fontFamily - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: annotation != "" + Text { + id: annotationLabel + text: (panel.hideKeyLabels)?"":annotation + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: units.gu( UI.annotationMargins ) + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" } } - - ColumnLayout { - id: topColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignTop - spacing: 0 - - Icon { - id: iconImageUp - source: iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) - : "" - color: key.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - - visible: (iconNormal[2] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - } - - Text { - id: topCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[2] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - } + Column { + spacing: units.gu( UI.annotationMargins ) + anchors.left: parent.left + Text { + id: tapLabel + text: (panel.hideKeyLabels)?"":charlabel[0] + anchors.horizontalCenter: parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.selectionColor + textFormat: Text.StyledText } - } - RowLayout { - id: bottomRightCol - anchors.right: parent.right - spacing: 0 - - ColumnLayout { - id: bottomColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.alignment : Qt.AlignBottom - spacing: 0 - - Text { - id: bottomCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[4] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - } - } + } - ColumnLayout { - id: rightColumn - Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 - Layout.preferredHeight: buttonRect.height - spacing: 0 - - Text { - id: middleRightLabel - text: (panel.hideKeyLabels)?"":charlabel[3] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - } - } - } } FlickPop { + id : flickPop anchors.horizontalCenter: buttonRect.horizontalCenter anchors.bottom: buttonRect.top anchors.bottomMargin: key.height * 0.5 width: units.gu((UI.fontSize + UI.flickMargin) * 3) height: units.gu((UI.fontSize + UI.flickMargin) * 3) chars: leaves + icons:iconNormal + angles:iconAngles index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false } @@ -317,4 +255,37 @@ Item { keyFlickArea.cancelPress(); } } + // make sure the icon changes even if the property icon* change on runtime + + state: panel.activeKeypadState + states: [ + State { + name: "caps" + + PropertyChanges { + target: flickPop + icons: panel.autoCapsTriggered ? iconShifted : iconCapsLock + } + PropertyChanges { + target: iconImageUp + source: panel.autoCapsTriggered ? iconAutoCaps[2] : iconCaps[2] + color: key.colorShifted + } + PropertyChanges { + target: iconImageDown + source: panel.autoCapsTriggered ? iconAutoCaps[4] : iconCaps[4] + color: key.colorShifted + } + PropertyChanges { + target: iconImageLeft + source: panel.autoCapsTriggered ? iconAutoCaps[1] : iconCaps[1] + color: key.colorShifted + } + PropertyChanges { + target: iconImageRight + source: panel.autoCapsTriggered ? iconAutoCaps[3] : iconCaps[3] + color: key.colorShifted + } + } + ] } diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index 272e41884..594a1b2b3 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -29,60 +29,59 @@ Item { property var chars: ["", "", "", "", ""]; property var icons: ["", "", "", "", ""]; - property var iconSources: ["", "", "", "", ""]; + property var angles: ["", "", "", "", ""]; property int index: 0 visible: false FlickPopKey { id: center - labelChar: chars[0] - labelIcon:icons[0] - labelIconSource:iconSources[0] + labelChar: chars[0] ? chars[0] : "" + labelIcon: icons[0] ? icons[0] : "" anchors.centerIn: parent labelOpacity: index == 0 ? 1.0 : 0.6 + labelAngle: angles[0] ? angles[0] : "" labelColor: index == 0 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } FlickPopKey { labelChar: chars[1] ? chars[1] : "" labelIcon:icons[1] ? icons[1] : "" - labelIconSource:iconSources[1] ? iconSources[1] : "" anchors.verticalCenter: center.verticalCenter anchors.right: center.left labelOpacity: index == 1 ? 1.0 : 0.6 + labelAngle: angles[1] ? angles[1] : "" labelColor: index == 1 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } FlickPopKey { labelChar: chars[2] ? chars[2] : "" labelIcon:icons[2] ? icons[2] : "" - labelIconSource:iconSources[2] ? iconSources[2] : "" anchors.horizontalCenter: center.horizontalCenter anchors.bottom: center.top labelOpacity: index == 2 ? 1.0 : 0.6 + labelAngle: angles[2] ? angles[2] : "" labelColor: index == 2 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } FlickPopKey { labelChar: chars[3] ? chars[3] : "" labelIcon:icons[3] ? icons[3] : "" - labelIconSource:iconSources[3] ? iconSources[3] : "" anchors.verticalCenter: center.verticalCenter anchors.left: center.right labelOpacity: index == 3 ? 1.0 : 0.6 + labelAngle: angles[3] ? angles[3] : "" labelColor: index == 3 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } FlickPopKey { labelChar: chars[4] ? chars[4] : "" labelIcon:icons[4] ? icons[4] : "" - labelIconSource:iconSources[4] ? iconSources[4] : "" anchors.horizontalCenter: center.horizontalCenter anchors.top: center.bottom labelOpacity: index == 4 ? 1.0 : 0.6 - labelAngle: 180 + labelAngle: angles[4] ? angles[4] : "" labelColor: index == 4 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor } } diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index ec0cbf54b..c587c5df0 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -25,7 +25,6 @@ Rectangle { property string labelChar property string labelIcon - property string labelIconSource property color labelColor: fullScreenItem.theme.fontColor property real labelOpacity: 1.0 property int labelAngle: 0 @@ -50,8 +49,8 @@ Rectangle { source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" color: parent.labelColor opacity: parent.labelOpacity - transform: Rotation { origin.x:fontSize/2; origin.y:fontSize/2; angle:labelAngle} - height: fontSize - width: height + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:labelAngle} + height: iconSize + width: iconSize } } From ddcbcaf0e070331d54e44053a3150f00c12336f7 Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Tue, 19 Nov 2019 14:18:22 -0300 Subject: [PATCH 21/57] pull updates from danfro's crosslayout --- qml/keys/FlickCharKey.qml | 175 ++++++++++++++++++++++++++++---------- 1 file changed, 128 insertions(+), 47 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index e3f63cf8d..341843886 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -87,7 +87,6 @@ Item { property bool borderEnabled: fullScreenItem.theme.keyBorderEnabled property string borderColor: borderEnabled ? fullScreenItem.theme.charKeyBorderColor : "transparent" property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); - property int iconSize: isPortrait ? buttonRect.width/4 : buttonRect.width/6 property bool isPortrait: buttonRect.width/buttonRect.height > 2 ? false : true /// annotation shows a small label in the upper right corner @@ -130,57 +129,139 @@ Item { /// label of the key // the label is also the value subitted to the app - Column { - spacing: units.gu( UI.annotationsMargins ) - anchors.centerIn: parent - Text { - id: topLabel - text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) - anchors.right: (labelright)?parent.right:""; - anchors.left: (labelleft)?parent.left:""; - anchors.horizontalCenter: (labelleft||labelright)?"":parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + + RowLayout { + id: tapLeftTopCol + anchors.left: parent.left + spacing: 0 + + ColumnLayout { + id: tapColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Text { + id: tapLabel + text: (panel.hideKeyLabels)?"":charlabel[0] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.selectionColor + textFormat: Text.StyledText + } } - Text { - id: keyLabel - text: (panel.hideKeyLabels)?"":(label!=""?label:charlabel[1]+charlabel[4]+botlabel+charlabel[3]) - anchors.horizontalCenter: parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: label!="" + + ColumnLayout { + id: leftColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Text { + id: middleLeftLabel + text: (panel.hideKeyLabels)?"":charlabel[1] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } } - Text{ - id: annotationLabel - text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: units.gu( UI.annotationMargins ) - font.family: UI.fontFamily - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: annotation != "" + } + + ColumnLayout { + id: topColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignTop + spacing: 0 + + Text { + id: topCenterLabel + text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } + Text { + id: keyLabel + text: (panel.hideKeyLabels)?"":label + anchors.horizontalCenter: parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: label!="" + } } } - Text { - id: annotationLabel - text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: units.gu( UI.annotationMargins ) - font.family: UI.fontFamily - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: annotation != "" + RowLayout { + id: bottomRightCol + anchors.right: parent.right + spacing: 0 + + ColumnLayout { + id: bottomColumn + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.alignment : Qt.AlignBottom + spacing: 0 + + Text { + id: bottomCenterLabel + text: (panel.hideKeyLabels)?"":charlabel[4]+botlabel + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } + } + + ColumnLayout { + id: rightColumn + Layout.alignment: Qt.AlignVCenter + Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.preferredHeight: buttonRect.height + spacing: 0 + + Text { + id: middleRightLabel + text: (panel.hideKeyLabels)?"":charlabel[3] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + } + Text { + id: annotationLabel + text: (panel.hideKeyLabels)?"":annotation + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: units.gu( UI.annotationMargins ) + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" + } } } Column { From ea652cf467fb95e0a853234a56a48f737eca189b Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Tue, 19 Nov 2019 14:20:57 -0300 Subject: [PATCH 22/57] fix indentation --- qml/keys/FlickCharKey.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 341843886..94e21ec1c 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -198,7 +198,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter font.family: UI.fontFamily font.pixelSize: fontSize - font.weight: Font.Light + font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText visible: label!="" @@ -257,10 +257,10 @@ Item { anchors.bottomMargin: units.gu( UI.annotationMargins ) font.family: UI.fontFamily font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light + font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: annotation != "" + visible: annotation != "" } } } From a24fe0a0485661ab9aa807dfebe47f0309fa516b Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 29 Apr 2020 14:23:26 -0300 Subject: [PATCH 23/57] clean up code --- qml/keys/FlickCharKey.qml | 201 ++++++++++++++++++++++++++------------ 1 file changed, 141 insertions(+), 60 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 94e21ec1c..9d22765b7 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -31,8 +31,6 @@ Item { /* to be set in keyboard layouts */ property string label: ""; - property string toplabel: ""; - property string botlabel: ""; property var leaves: ["", "", "", "", ""]; property int index: keyFlickArea.index; property bool highlight: false; @@ -87,7 +85,7 @@ Item { property bool borderEnabled: fullScreenItem.theme.keyBorderEnabled property string borderColor: borderEnabled ? fullScreenItem.theme.charKeyBorderColor : "transparent" property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); - property bool isPortrait: buttonRect.width/buttonRect.height > 2 ? false : true + property int iconSize: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 /// annotation shows a small label in the upper right corner // if the annotiation property is set, it will be used. If not, the first position in extended[] list or extendedShifted[] list will @@ -129,6 +127,33 @@ Item { /// label of the key // the label is also the value subitted to the app + Column { + spacing: units.gu( UI.annotationsMargins ) + anchors.centerIn: parent + Text { + id: keyLabel + text: (panel.hideKeyLabels)?"":label + anchors.horizontalCenter: parent.horizontalCenter + font.family: UI.fontFamily + font.pixelSize: fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: label!="" + } + Text{ + id: annotationLabel + text: (panel.hideKeyLabels)?"":annotation + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottomMargin: units.gu( UI.annotationMargins ) + font.family: UI.fontFamily + font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: annotation != "" + } + } RowLayout { id: tapLeftTopCol @@ -137,10 +162,22 @@ Item { ColumnLayout { id: tapColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/3 + Layout.minimumWidth: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/3 Layout.alignment : Qt.AlignTop spacing: 0 + Icon { + id: iconImage + source: iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) + : "" + color: fullScreenItem.theme.selectionColor + anchors.horizontalCenter: parent.horizontalCenter + visible: (iconNormal[0] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[0]} + } + Text { id: tapLabel text: (panel.hideKeyLabels)?"":charlabel[0] @@ -151,46 +188,74 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.selectionColor textFormat: Text.StyledText + visible: !iconImage.visible } } ColumnLayout { id: leftColumn Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.minimumWidth: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 Layout.preferredHeight: buttonRect.height spacing: 0 + Icon { + id: iconImageLeft + source: iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) + : "" + color: key.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + visible: (iconNormal[1] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[1]} + } + Text { - id: middleLeftLabel - text: (panel.hideKeyLabels)?"":charlabel[1] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + id: middleLeftLabel + text: (panel.hideKeyLabels)?"":charlabel[1] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: !iconImageLeft.visible } } } ColumnLayout { id: topColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.minimumWidth: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 Layout.alignment : Qt.AlignTop spacing: 0 + Icon { + id: iconImageUp + source: iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) + : "" + color: key.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + + visible: (iconNormal[2] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[2]} + } + Text { - id: topCenterLabel - text: (panel.hideKeyLabels)?"":(toplabel!=""?toplabel:charlabel[2]) - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + id: topCenterLabel + text: (panel.hideKeyLabels)?"":charlabel[2] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: !iconImageUp.visible } Text { id: keyLabel @@ -213,54 +278,70 @@ Item { ColumnLayout { id: bottomColumn - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.minimumWidth: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 Layout.alignment : Qt.AlignBottom spacing: 0 + Icon { + id: iconImageDown + source: iconNormal[4] ? "image://theme/%1".arg(iconNormal[4]) + : "" + color: key.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + visible: (iconNormal[4] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[4]} + } + Text { - id: bottomCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[4]+botlabel - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + id: bottomCenterLabel + text: (panel.hideKeyLabels)?"":charlabel[4] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gu(0.25) + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: !iconImageDown.visible } } ColumnLayout { id: rightColumn Layout.alignment: Qt.AlignVCenter - Layout.minimumWidth: isPortrait ? buttonRect.width/4 : buttonRect.width/6 + Layout.minimumWidth: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 Layout.preferredHeight: buttonRect.height spacing: 0 - Text { - id: middleRightLabel - text: (panel.hideKeyLabels)?"":charlabel[3] - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.family: UI.fontFamily - font.pixelSize:fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText + Icon { + id: iconImageRight + source: iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) + : "" + color: key.colorNormal + anchors.horizontalCenter: parent.horizontalCenter + visible: (iconNormal[3] != "" && !panel.hideKeyLabels) + width: iconSize + height: iconSize + transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[3]} } + Text { - id: annotationLabel - text: (panel.hideKeyLabels)?"":annotation - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottomMargin: units.gu( UI.annotationMargins ) - font.family: UI.fontFamily - font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: annotation != "" + id: middleRightLabel + text: (panel.hideKeyLabels)?"":charlabel[3] + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + font.family: UI.fontFamily + font.pixelSize:fontSize + font.weight: Font.Light + color: fullScreenItem.theme.fontColor + textFormat: Text.StyledText + visible: !iconImageRight.visible } } } @@ -283,15 +364,15 @@ Item { } FlickPop { - id : flickPop + id : flickPop anchors.horizontalCenter: buttonRect.horizontalCenter anchors.bottom: buttonRect.top anchors.bottomMargin: key.height * 0.5 width: units.gu((UI.fontSize + UI.flickMargin) * 3) height: units.gu((UI.fontSize + UI.flickMargin) * 3) chars: leaves - icons:iconNormal - angles:iconAngles + icons:iconNormal + angles:iconAngles index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false } From 318409780adb4d521fb03523ab5cc9a82b09a61b Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 29 Apr 2020 18:25:14 -0300 Subject: [PATCH 24/57] add accents to the keyboard --- plugins/en@flick/qml/Keyboard_en@flick.qml | 41 ++++-- .../en@flick/qml/Keyboard_en@flick_email.qml | 56 ++++--- .../en@flick/qml/Keyboard_en@flick_url.qml | 56 ++++--- .../qml/Keyboard_en@flick_url_search.qml | 60 +++++--- qml/keys/CaseSwitchKey.qml | 13 +- qml/keys/FlickActionKey.qml | 33 +++++ qml/keys/FlickCharKey.qml | 2 + qml/keys/FlickPop.qml | 6 + qml/keys/FlickPopKey.qml | 3 +- qml/keys/LayoutBar.qml | 47 ++++++ qml/keys/SymojiKey.qml | 45 ++++++ qml/keys/qmldir | 3 + qml/languages/Keyboard_accents.qml | 138 ++++++++++++++++++ 13 files changed, 423 insertions(+), 80 deletions(-) create mode 100644 qml/keys/FlickActionKey.qml create mode 100644 qml/keys/LayoutBar.qml create mode 100644 qml/keys/SymojiKey.qml create mode 100644 qml/languages/Keyboard_accents.qml diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index 4ddb3cc6f..b1b2a564e 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -20,7 +20,8 @@ import keys 1.0 KeyPad { anchors.fill: parent; - content: c1 + content: c1 + symbols: "languages/Keyboard_accents.qml" Column { id: c1 property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; @@ -30,10 +31,9 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CaseSwitchKey { id: layout; } - - FlickCharKey { - label: layout.state == "caps" ? "QER" : "qer"; + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; annotation: layout.state == "caps" ? "1:" : "1:"; } @@ -84,12 +84,11 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - - CursorKey { leftSide:true} - FlickCharKey { - label: layout.state == "caps" ? "ZXC" : "zxc" - leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] - annotation: layout.state == "caps" ? "7\\" : "7\\" + + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: ["7", "]", "*", "[", "\\"] + leaves: ["7", "]", "*", "[", "\\"] } FlickCharKey { label: layout.state == "caps" ? "[ * ]" : "[ * ]" @@ -101,7 +100,10 @@ KeyPad { leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] annotation: layout.state == "caps" ? "9/" : "9/" } - CursorKey { rightSide:true; } + FlickCharKey { + charlabel: ["€", "₹", "£", "", "¥"] + leaves: ["€", "₹", "£", "", "¥"] + } } Row { @@ -127,4 +129,19 @@ KeyPad { CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height } } } // column + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 + + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } + + } } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 79fa81cc7..321959369 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -20,7 +20,7 @@ import keys 1.0 KeyPad { anchors.fill:parent; content: c1 - + symbols: "languages/Keyboard_accents.qml" Column { id: c1 anchors.fill:parent; @@ -29,9 +29,9 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CaseSwitchKey { id: layout; } - FlickCharKey { - label: layout.state == "caps" ? "QER" : "qer"; + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; annotation: layout.state == "caps" ? "1:" : "1:"; } @@ -82,12 +82,11 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - - CursorKey { leftSide:true; } - FlickCharKey { - label: layout.state == "caps" ? "ZXC" : "zxc" - leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] - annotation: layout.state == "caps" ? "7\\" : "7\\" + + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: ["7", "]", "*", "[", "\\"] + leaves: ["7", "]", "*", "[", "\\"] } FlickCharKey { label: layout.state == "caps" ? "[*]" : "[*]" @@ -95,11 +94,13 @@ KeyPad { annotation: layout.state == "caps" ? "8V" : "8v" } FlickCharKey { - label: layout.state == "caps" ? "BNM" : "bnm" - leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] - annotation: layout.state == "caps" ? "9/" : "9/" + charlabel: ["9", ")", "?", "(", "/"] + leaves: ["9", ")", "?", "(", "/"] + } + FlickCharKey { + charlabel: ["€", "₹", "£", "", "¥"] + leaves: ["€", "₹", "£", "", "¥"] } - CursorKey { rightSide:true; } } Row { @@ -118,10 +119,27 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: [".", ".io", ".com", ".org",".net"]; - } + charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; + leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; + unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + } + BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} + } + + } // column + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 + + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } - } // column + } } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index d75bb281f..c5f8d315c 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -21,7 +21,7 @@ KeyPad { anchors.fill:parent; content: c1 - + symbols: "languages/Keyboard_accents.qml" Column { id: c1 anchors.fill:parent; @@ -31,9 +31,9 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CaseSwitchKey { id: layout; } - FlickCharKey { - label: layout.state == "caps" ? "QER" : "qer"; + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; annotation: layout.state == "caps" ? "1:" : "1:"; } @@ -84,12 +84,11 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - - CursorKey { leftSide:true; } - FlickCharKey { - label: layout.state == "caps" ? "ZXC" : "zxc" - leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] - annotation: layout.state == "caps" ? "7\\" : "7\\" + + SymbolShiftKey { id: symShiftKey; } + FlickCharKey { + charlabel: ["7", "]", "*", "[", "\\"] + leaves: ["7", "]", "*", "[", "\\"] } FlickCharKey { label: layout.state == "caps" ? "[*]" : "[*]" @@ -97,11 +96,13 @@ KeyPad { annotation: layout.state == "caps" ? "8V" : "8v" } FlickCharKey { - label: layout.state == "caps" ? "BNM" : "bnm" - leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] - annotation: layout.state == "caps" ? "9/" : "9/" + charlabel: ["9", ")", "?", "(", "/"] + leaves: ["9", ")", "?", "(", "/"] } - CursorKey { rightSide:true; } + EmojiKey { + id: emojiKey; + + } } Row { @@ -120,10 +121,27 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: [".", ".io", ".com", ".org",".net"]; - } + charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; + leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; + unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + } + BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} + } + + } // column + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 + + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } - } // column + } } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index 6c2f53cc7..2e0e6a243 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -21,7 +21,7 @@ KeyPad { anchors.fill:parent; content: c1 - + symbols: "languages/Keyboard_accents.qml" Column { id: c1 anchors.fill:parent; @@ -31,9 +31,9 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - CaseSwitchKey { id: layout; } - FlickCharKey { - label: layout.state == "caps" ? "QER" : "qer"; + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; annotation: layout.state == "caps" ? "1:" : "1:"; } @@ -84,12 +84,11 @@ KeyPad { Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - - CursorKey { leftSide:true; } - FlickCharKey { - label: layout.state == "caps" ? "ZXC" : "zxc" - leaves: layout.state == "caps" ? ["7", "Z", "X", "C", "\\"] : ["7", "z", "x", "c", "\\"] - annotation: layout.state == "caps" ? "7\\" : "7\\" + + SymbolShiftKey { id: symShiftKey; } + FlickCharKey { + charlabel: ["7", "]", "*", "[", "\\"] + leaves: ["7", "]", "*", "[", "\\"] } FlickCharKey { label: layout.state == "caps" ? "[*]" : "[*]" @@ -97,11 +96,13 @@ KeyPad { annotation: layout.state == "caps" ? "8V" : "8v" } FlickCharKey { - label: layout.state == "caps" ? "BNM" : "bnm" - leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] - annotation: layout.state == "caps" ? "9/" : "9/" + charlabel: ["9", ")", "?", "(", "/"] + leaves: ["9", ")", "?", "(", "/"] } - CursorKey { rightSide:true; } + EmojiKey { + id: emojiKey; + + } } Row { @@ -120,12 +121,27 @@ KeyPad { annotation: layout.state == "caps" ? "0%" : "0%"; } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"]; - leaves: [".", ".io", ".com", ".org",".net"]; - unstyledLeaves: [".", ".io", ".com", ".org",".net"]; - } - CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height;} - } - - } // column + charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; + leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; + unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + } + BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} + } + + } // column + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 + + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } + + } } diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 94d72cae9..1911663e8 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -21,13 +21,12 @@ import Ubuntu.Components.Popups 1.3 import "key_constants.js" as UI -FlickCharKey { - padding: UI.actionKeyPadding - toplabel:kana.label - botlabel:kana.annotation - charlabel: ["↵", "␣", "", "", ""] - leaves: kana.state=="caps"?["↵", "␣", "", ""/*"⎄"*/, "ⓐ"]:["↵", "␣", "Ⓐ", "", ""] - +FlickActionKey { + width: panel.keyWidth + iconNormal:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-disabled", "", "keyboard-caps-locked"] + iconShifted:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-enabled", "", "keyboard-caps-locked"] + iconCapsLock:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-locked", "", "keyboard-caps-disabled"] + iconAngles:["","","","","180"] overridePressArea: true property string preedit: maliit_input_method.preedit diff --git a/qml/keys/FlickActionKey.qml b/qml/keys/FlickActionKey.qml new file mode 100644 index 000000000..d3b3d6e28 --- /dev/null +++ b/qml/keys/FlickActionKey.qml @@ -0,0 +1,33 @@ +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 + +import Ubuntu.Components 1.3 + +import "key_constants.js" as UI + +FlickCharKey { + property string shifted:"?123" + fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)) + * (4 / (label.length >= 2 ? (label.length <= 6 ? label.length + 2.5 : 8) : 4)); + property int visHeight: panel.keyHeight + property int padding: UI.actionKeyPadding + width: panel.keyWidth + units.gu( padding ) + normalColor: fullScreenItem.theme.actionKeyColor + pressedColor: fullScreenItem.theme.actionKeyPressedColor + borderColor: fullScreenItem.theme.actionKeyBorderColor +} diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 9d22765b7..09d4ec2db 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -78,6 +78,7 @@ Item { property color colorCapsLock: fullScreenItem.theme.fontColor property var iconAngles: ["", "", "", "", ""]; + property int leavesFontSize: units.gu(UI.fontSize); /* design */ property string normalColor: fullScreenItem.theme.charKeyColor @@ -373,6 +374,7 @@ Item { chars: leaves icons:iconNormal angles:iconAngles + popFontSize: leavesFontSize index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false } diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index 594a1b2b3..ad014cc4c 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -30,6 +30,7 @@ Item { property var chars: ["", "", "", "", ""]; property var icons: ["", "", "", "", ""]; property var angles: ["", "", "", "", ""]; + property int popFontSize: units.gu(UI.fontSize); property int index: 0 visible: false @@ -42,6 +43,7 @@ Item { labelOpacity: index == 0 ? 1.0 : 0.6 labelAngle: angles[0] ? angles[0] : "" labelColor: index == 0 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor + labelFontSize: popFontSize } FlickPopKey { @@ -53,6 +55,7 @@ Item { labelOpacity: index == 1 ? 1.0 : 0.6 labelAngle: angles[1] ? angles[1] : "" labelColor: index == 1 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor + labelFontSize: popFontSize } FlickPopKey { @@ -63,6 +66,7 @@ Item { labelOpacity: index == 2 ? 1.0 : 0.6 labelAngle: angles[2] ? angles[2] : "" labelColor: index == 2 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor + labelFontSize: popFontSize } FlickPopKey { @@ -73,6 +77,7 @@ Item { labelOpacity: index == 3 ? 1.0 : 0.6 labelAngle: angles[3] ? angles[3] : "" labelColor: index == 3 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor + labelFontSize: popFontSize } FlickPopKey { @@ -83,5 +88,6 @@ Item { labelOpacity: index == 4 ? 1.0 : 0.6 labelAngle: angles[4] ? angles[4] : "" labelColor: index == 4 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor + labelFontSize: popFontSize } } diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index c587c5df0..a64ce78c6 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -28,6 +28,7 @@ Rectangle { property color labelColor: fullScreenItem.theme.fontColor property real labelOpacity: 1.0 property int labelAngle: 0 + property int labelFontSize: units.gu(UI.fontSize) visible: labelChar || labelIcon? true : false color: fullScreenItem.theme.charKeyColor @@ -39,7 +40,7 @@ Rectangle { anchors.centerIn: parent text: parent.labelChar font.family: UI.fontFamily - font.pixelSize: units.gu(UI.fontSize) + font.pixelSize: labelFontSize font.bold: UI.fontBold color: parent.labelColor opacity: parent.labelOpacity diff --git a/qml/keys/LayoutBar.qml b/qml/keys/LayoutBar.qml new file mode 100644 index 000000000..55dad42cf --- /dev/null +++ b/qml/keys/LayoutBar.qml @@ -0,0 +1,47 @@ +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import Ubuntu.Components 1.3 + +import "key_constants.js" as UI +import "languages.js" as Languages + +ActionKey { + pressedColor: fullScreenItem.theme.actionKeyColor + overridePressArea: true; + + Label { + anchors.centerIn: parent + anchors.verticalCenterOffset: -parent.rowMargin / 2 - units.gu(0.15) + font.family: UI.fontFamily + font.weight: Font.Light + font.pixelSize: parent.fontSize * 0.6 + opacity: UI.spaceOpacity + text: Languages.languageIdToName(maliit_input_method.activeLanguage) + horizontalAlignment: Text.AlignHCenter + visible: !panel.hideKeyLabels + } + +onPressed: { + if (maliit_input_method.useAudioFeedback) + audioFeedback.play(); + + if (maliit_input_method.useHapticFeedback) + pressEffect.start(); + + } +} diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml new file mode 100644 index 000000000..84e9a520f --- /dev/null +++ b/qml/keys/SymojiKey.qml @@ -0,0 +1,45 @@ +/* + * Copyright 2013 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 + +import "key_constants.js" as UI + +FlickActionKey { + charlabel: (panel.state == "SYMBOLS") ? ["abc", "", "", "😀", ""]:["àþç", "", "", "😀", ""] + leaves: (panel.state == "SYMBOLS") ? ["abc", "", "", "😀", ""]:["àþç", "", "", "😀", ""] + leavesFontSize: 30; + width: panel.keyWidth; + action: "symbols"; + + overridePressArea: true; + + onReleased: { + if (index == 0) { + panel.state = (panel.state == "CHARACTERS") ? "SYMBOLS" : "CHARACTERS"; + } else if (index == 3) { + panel.state = (panel.state == "CHARACTERS") ? "EMOJI" : "CHARACTERS"; + } + } + onPressed: { + if (maliit_input_method.useAudioFeedback) + audioFeedback.play(); + + if (maliit_input_method.useHapticFeedback) + pressEffect.start(); + + } +} diff --git a/qml/keys/qmldir b/qml/keys/qmldir index 3e18dfb54..6612873ed 100644 --- a/qml/keys/qmldir +++ b/qml/keys/qmldir @@ -21,8 +21,11 @@ UI 1.0 key_constants.js CommitKey 1.0 CommitKey.qml CaseSwitchKey 1.0 CaseSwitchKey.qml FlickCharKey 1.0 FlickCharKey.qml +FlickActionKey 1.0 FlickActionKey.qml FlickArea 1.0 FlickArea.qml FlickPop 1.0 FlickPop.qml FlickPopKey 1.0 FlickPopKey.qml CursorKey 1.0 CursorKey.qml StringKey 1.0 StringKey.qml +LayoutBar 1.0 LayoutBar.qml +SymojiKey 1.0 SymojiKey.qml diff --git a/qml/languages/Keyboard_accents.qml b/qml/languages/Keyboard_accents.qml new file mode 100644 index 000000000..313010446 --- /dev/null +++ b/qml/languages/Keyboard_accents.qml @@ -0,0 +1,138 @@ +/* + * Copyright 2015 Canonical Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import keys 1.0 + +KeyPad { + + anchors.fill: parent; + content: c1 + symbols: "languages/Keyboard_emoji.qml" + Column { + id: c1 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 + anchors.fill: parent; + spacing: 0 + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: layout.state == "caps" ? ["1", "À", "Â", "Á", "Ä"] : ["1", "à", "â", "á", "ä"]; + leaves: layout.state == "caps" ? ["1", "À", "Â", "Á", "Ä"] : ["1", "à", "â", "á", "ä"]; + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["2", "Ù", "Û", "Ú", "Ü"] : ["2", "ù", "û", "ú", "ü"]; + leaves: layout.state == "caps" ? ["2", "Ù", "Û", "Ú", "Ü"] : ["2", "ù", "û", "ú", "ü"]; + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["3", "Å", "Æ", "Ý", "Œ"] : ["3", "å", "æ", "ý", "œ"]; + leaves: layout.state == "caps" ? ["3", "Å", "Æ", "Ý", "Œ"] : ["3", "å", "æ", "ý", "œ"]; + } + CaseSwitchKey { id: layout; labelright:true} + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + FlickCharKey { + charlabel: ["=", "", "!", "&", "|"] + labelleft:true + leaves: layout.state == "caps" ? ["=", "", "!", "&", "|"] : ["=", "", "!", "&", "|"] + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["4", "È", "Ê", "É", "Ë"] : ["4", "è", "ê", "é", "ë"]; + leaves: layout.state == "caps" ? ["4", "È", "Ê", "É", "Ë"] : ["4", "è", "ê", "é", "ë"]; + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["5", "Ì", "Î", "Í", "Ï"] : ["5", "ì", "î", "í", "ï"]; + leaves: layout.state == "caps" ? ["5", "Ì", "Î", "Í", "Ï"] : ["5", "ì", "î", "í", "ï"]; + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["6", "Ò", "Ô", "Ó", "Ö"] : ["6", "ò", "ô", "ó", "ö"]; + leaves: layout.state == "caps" ? ["6", "Ò", "Ô", "Ó", "Ö"] : ["6", "ò", "ô", "ó", "ö"]; + } + FlickCharKey { + charlabel: ["~", "_", "^", "", "$"] + labelright:true + leaves: ["~", "_", "^", "", "$"] + + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: ["7", "»", "–", "«", "—"] + leaves: ["7", "»", "–", "«", "—"] + } + FlickCharKey { + charlabel: layout.state == "caps" ? ["8", "Ð", "Ñ", "Þ", "Ç"] : ["8", "ð", "ñ", "þ", "ç"] + leaves: layout.state == "caps" ? ["8", "Ð", "Ñ", "Þ", "Ç"] : ["8", "ð", "ñ", "þ", "ç"] + } + FlickCharKey { + charlabel: ["9", "♪", "√", "☆", "…"] + leaves: ["9", "♪", "√", "☆", "…"] + } + FlickCharKey { + charlabel: ["€", "₹", "£", "", "¥"] + leaves: ["€", "₹", "£", "", "¥"] + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter; + spacing: 0 + + LanguageKey { width: panel.keyWidth; visHeight:layout.height;} + FlickCharKey { + charlabel: [",", "“", "•", "”", "„"] + leaves: [",", "“", "•", "”", "„"] + } + FlickCharKey { + charlabel: ["0", "§", "ª", "ß", "°"] + leaves: ["0", "§", "ª", "ß", "°"] + } + FlickCharKey { + charlabel: [".", "¡", "‽", "¿", "⸘"] + leaves: [".", "¡", "‽", "¿", "⸘"] + } + BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} + } + + } // column + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 + + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } + + } +} From f581bf7ea364d0bfb74c0d04ca03140f3c82299e Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Thu, 30 Apr 2020 14:54:07 -0300 Subject: [PATCH 25/57] clean up code --- plugins/en@flick/qml/Keyboard_en@flick.qml | 6 +- .../en@flick/qml/Keyboard_en@flick_email.qml | 7 +- .../en@flick/qml/Keyboard_en@flick_url.qml | 7 +- .../qml/Keyboard_en@flick_url_search.qml | 7 +- qml/keys/FlickCharKey.qml | 82 +++++++++---------- qml/keys/FlickPopKey.qml | 8 +- 6 files changed, 60 insertions(+), 57 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index b1b2a564e..8cc4cb3dc 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -55,9 +55,9 @@ KeyPad { spacing: 0 FlickCharKey { - label: layout.state == "caps" ? "!_" : "!_" - leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" + charlabel: ["=", "", "!", "&", "|"] + labelleft:true + leaves: ["=", "", "!", "&", "|"] } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 321959369..821ab66c9 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -16,6 +16,7 @@ import QtQuick 2.4 import keys 1.0 +import "../../keys/languages.js" as Languages KeyPad { anchors.fill:parent; @@ -53,9 +54,9 @@ KeyPad { spacing: 0 FlickCharKey { - label: layout.state == "caps" ? "!_" : "!_" - leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" + charlabel: ["=", "", "!", "&", "|"] + labelleft:true + leaves: ["=", "", "!", "&", "|"] } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index c5f8d315c..29e50bee0 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -16,6 +16,7 @@ import QtQuick 2.4 import keys 1.0 +import "../../keys/languages.js" as Languages KeyPad { @@ -55,9 +56,9 @@ KeyPad { spacing: 0 FlickCharKey { - label: layout.state == "caps" ? "!_" : "!_" - leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" + charlabel: ["=", "", "!", "&", "|"] + labelleft:true + leaves: ["=", "", "!", "&", "|"] } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index 2e0e6a243..fe822a0ab 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -16,6 +16,7 @@ import QtQuick 2.4 import keys 1.0 +import "../../keys/languages.js" as Languages KeyPad { @@ -55,9 +56,9 @@ KeyPad { spacing: 0 FlickCharKey { - label: layout.state == "caps" ? "!_" : "!_" - leaves: layout.state == "caps" ? ["=", "", "!", "_", "|"] : ["=", "", "!", "_", "|"] - annotation: layout.state == "caps" ? "=|" : "=|" + charlabel: ["=", "", "!", "&", "|"] + labelleft:true + leaves: ["=", "", "!", "&", "|"] } FlickCharKey { label: layout.state == "caps" ? "AWD" : "awd"; diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 09d4ec2db..476b5b31c 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -59,19 +59,19 @@ Item { property var iconShifted: ["", "", "", "", ""]; property var iconCapsLock: ["", "", "", "", ""]; property var iconCaps: [ - "", - iconCapsLock[1] ? "image://theme/%1".arg(iconCapsLock[1]) : "", - iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) : "", - iconCapsLock[3] ? "image://theme/%1".arg(iconCapsLock[3]) : "", - iconCapsLock[4] ? "image://theme/%1".arg(iconCapsLock[4]) : "" - ]; + "", + iconCapsLock[1] ? "image://theme/%1".arg(iconCapsLock[1]) : "", + iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) : "", + iconCapsLock[3] ? "image://theme/%1".arg(iconCapsLock[3]) : "", + iconCapsLock[4] ? "image://theme/%1".arg(iconCapsLock[4]) : "" + ]; property var iconAutoCaps: [ - "", - iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) : "", - iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) : "", - iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) : "", - iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) : "" - ]; + "", + iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) : "", + iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) : "", + iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) : "", + iconShifted[4] ? "image://theme/%1".arg(iconShifted[4]) : "" + ]; property color colorNormal: fullScreenItem.theme.fontColor property color colorShifted: fullScreenItem.theme.fontColor @@ -86,7 +86,6 @@ Item { property bool borderEnabled: fullScreenItem.theme.keyBorderEnabled property string borderColor: borderEnabled ? fullScreenItem.theme.charKeyBorderColor : "transparent" property int fontSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); - property int iconSize: !fullScreenItem.landscape ? buttonRect.width/4 : buttonRect.width/6 /// annotation shows a small label in the upper right corner // if the annotiation property is set, it will be used. If not, the first position in extended[] list or extendedShifted[] list will @@ -121,6 +120,7 @@ Item { anchors.rightMargin: key.rightSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin anchors.bottomMargin: key.rowMargin radius: units.dp(4) + property int iconSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); border{ width: borderEnabled ? units.gu(0.1) : 0 color: borderColor @@ -174,9 +174,9 @@ Item { color: fullScreenItem.theme.selectionColor anchors.horizontalCenter: parent.horizontalCenter visible: (iconNormal[0] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[0]} + width: buttonRect.iconSize + height: buttonRect.iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[0]} } Text { @@ -207,9 +207,9 @@ Item { color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter visible: (iconNormal[1] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[1]} + width: buttonRect.iconSize + height: buttonRect.iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[1]} } Text { @@ -236,14 +236,14 @@ Item { Icon { id: iconImageUp source: iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) - : "" + : "" color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter visible: (iconNormal[2] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[2]} + width: buttonRect.iconSize + height: buttonRect.iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[2]} } Text { @@ -292,9 +292,9 @@ Item { anchors.bottom: parent.bottom anchors.bottomMargin: units.gu(0.25) visible: (iconNormal[4] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[4]} + width: buttonRect.iconSize + height: buttonRect.iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[4]} } Text { @@ -323,13 +323,13 @@ Item { Icon { id: iconImageRight source: iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) - : "" + : "" color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter visible: (iconNormal[3] != "" && !panel.hideKeyLabels) - width: iconSize - height: iconSize - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:iconAngles[3]} + width: buttonRect.iconSize + height: buttonRect.iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[3]} } Text { @@ -374,7 +374,7 @@ Item { chars: leaves icons:iconNormal angles:iconAngles - popFontSize: leavesFontSize + popFontSize: leavesFontSize index: keyFlickArea.index visible:(maliit_input_method.enableMagnifier)? key.currentlyPressed && chars.length > 1:false } @@ -389,11 +389,11 @@ Item { key.released(); return; } - event_handler.onKeyReleased(leaves[index], action); + event_handler.onKeyReleased(leaves[index], action); if(panel.autoCapsTriggered){ - panel.autoCapsTriggered=false; - } - + panel.autoCapsTriggered=false; + } + } onPressed: { @@ -426,26 +426,26 @@ Item { State { name: "caps" - PropertyChanges { + PropertyChanges { target: flickPop - icons: panel.autoCapsTriggered ? iconShifted : iconCapsLock + icons: panel.autoCapsTriggered ? iconShifted : iconCapsLock } - PropertyChanges { + PropertyChanges { target: iconImageUp source: panel.autoCapsTriggered ? iconAutoCaps[2] : iconCaps[2] color: key.colorShifted } - PropertyChanges { + PropertyChanges { target: iconImageDown source: panel.autoCapsTriggered ? iconAutoCaps[4] : iconCaps[4] color: key.colorShifted } - PropertyChanges { + PropertyChanges { target: iconImageLeft source: panel.autoCapsTriggered ? iconAutoCaps[1] : iconCaps[1] color: key.colorShifted } - PropertyChanges { + PropertyChanges { target: iconImageRight source: panel.autoCapsTriggered ? iconAutoCaps[3] : iconCaps[3] color: key.colorShifted diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index a64ce78c6..8666ab65c 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -47,11 +47,11 @@ Rectangle { } Icon { anchors.centerIn: parent - source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" + source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" color: parent.labelColor opacity: parent.labelOpacity - transform: Rotation { origin.x:iconSize/2; origin.y:iconSize/2; angle:labelAngle} - height: iconSize - width: iconSize + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:labelAngle} + height: buttonRect.iconSize + width: buttonRect.iconSize } } From 3842465051c93bf38c34b8d8537032f62df4b360 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Thu, 30 Apr 2020 14:54:21 -0300 Subject: [PATCH 26/57] more symbols! --- qml/languages/Keyboard_accents.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/languages/Keyboard_accents.qml b/qml/languages/Keyboard_accents.qml index 313010446..f3f4df081 100644 --- a/qml/languages/Keyboard_accents.qml +++ b/qml/languages/Keyboard_accents.qml @@ -52,9 +52,9 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "!", "&", "|"] + charlabel: ["=", "", "±", "÷", "×"] labelleft:true - leaves: layout.state == "caps" ? ["=", "", "!", "&", "|"] : ["=", "", "!", "&", "|"] + leaves: ["=", "", "±", "÷", "×"] } FlickCharKey { charlabel: layout.state == "caps" ? ["4", "È", "Ê", "É", "Ë"] : ["4", "è", "ê", "é", "ë"]; @@ -69,9 +69,9 @@ KeyPad { leaves: layout.state == "caps" ? ["6", "Ò", "Ô", "Ó", "Ö"] : ["6", "ò", "ô", "ó", "ö"]; } FlickCharKey { - charlabel: ["~", "_", "^", "", "$"] + charlabel: ["~", "™", "©", "", "®"] labelright:true - leaves: ["~", "_", "^", "", "$"] + leaves: ["~", "™", "©", "", "®"] } } From 6fc23e2e89d8c99646d4b950630bc52f29dbb663 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 3 May 2020 23:13:23 -0300 Subject: [PATCH 27/57] upgrade flickey with the shifted keypadstate --- plugins/en@flick/qml/Keyboard_en@flick.qml | 158 +++++++++------ .../en@flick/qml/Keyboard_en@flick_email.qml | 157 +++++++++------ qml/keys/CaseSwitchKey.qml | 77 +++++--- qml/keys/FlickCharKey.qml | 186 +++++++++++------- qml/keys/FlickPop.qml | 31 ++- qml/keys/FlickPopKey.qml | 2 +- qml/keys/SymojiKey.qml | 35 +++- 7 files changed, 399 insertions(+), 247 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index 8cc4cb3dc..f5f0ba213 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -24,28 +24,36 @@ KeyPad { symbols: "languages/Keyboard_accents.qml" Column { id: c1 - property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 anchors.fill: parent; - spacing: 0 + spacing: 0 Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} - FlickCharKey { - charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - annotation: layout.state == "caps" ? "1:" : "1:"; + ActionKey{ + width:panel.keyWidth; + height:layout.height; + visHeight:height; + pressedColor: fullScreenItem.theme.actionKeyColor } FlickCharKey { - label: layout.state == "caps" ? "TYU" : "tyu"; - leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; - annotation: layout.state == "caps" ? "2$" : "2$"; + charlabel:["1", "q", "e", "r", ":"]; + shiftedlabel:["1", "Q", "E", "R", ":"]; + leaves:["1", "q", "e", "r", ":"]; + shiftedleaves:["1", "Q", "E", "R", ":"]; } FlickCharKey { - label: layout.state == "caps" ? "IOP" : "iop"; - leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; - annotation: layout.state == "caps" ? "3#" : "3#"; + charlabel:["2", "t", "y", "u", "g"]; + shiftedlabel:["2", "T", "Y", "U", "G"]; + leaves:["2", "t", "y", "u", "g"]; + shiftedleaves:["2", "T", "Y", "U", "G"]; + } + FlickCharKey { + charlabel:["3", "i", "o", "m", ";"]; + shiftedlabel:["3", "I", "O", "M", ";"] + leaves:["3", "i", "o", "m", ";"]; + shiftedleaves:["3", "I", "O", "M", ";"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;height:layout.height;} } @@ -55,14 +63,11 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "!", "&", "|"] - labelleft:true - leaves: ["=", "", "!", "&", "|"] - } - FlickCharKey { - label: layout.state == "caps" ? "AWD" : "awd"; - leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; - annotation: layout.state == "caps" ? "4S" : "4s"; + charlabel: ["#", "", "|", "&", "_"] + shiftedlabel:charlabel + labelleft:true + leaves: ["#", "", "|", "&", "_"] + shiftedleaves:leaves } FlickCharKey { label: layout.state == "caps" ? "(F)" : "(f)"; @@ -78,6 +83,29 @@ KeyPad { label: layout.state == "caps" ? "&`" : "&`" leaves: layout.state == "caps" ? [";", "&", "`", "", "~"] : [";", "&", "`", "", "~"] annotation: layout.state == "caps" ? ";~" : ";~" + charlabel:["4", "a", "w", "d", "s"]; + shiftedlabel:["4", "A", "W", "D", "S"]; + leaves:["4", "a", "w", "d", "s"]; + shiftedleaves:["4", "A", "W", "D", "S"]; + } + FlickCharKey { + charlabel:["5", "b", "p", "f", "n"]; + shiftedlabel:["5", "B", "P", "F", "N"]; + leaves:["5", "b", "p", "f", "n"]; + shiftedleaves:["5", "B", "P", "F", "N"]; + } + FlickCharKey { + charlabel:["6", "h", "k", "l", "j"]; + shiftedlabel:["6", "H", "K", "L", "J"]; + leaves:["6", "h", "k", "l", "j"]; + shiftedleaves:["6", "H", "K", "L", "J"]; + } + FlickCharKey { + charlabel: ["*", "€", "^", "", "$"] + shiftedlabel:charlabel + labelright:true + leaves: ["*", "€", "^", "", "$"] + shiftedleaves:leaves } } @@ -85,63 +113,73 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - SymojiKey { id: symojiKey;} - FlickCharKey { - charlabel: ["7", "]", "*", "[", "\\"] - leaves: ["7", "]", "*", "[", "\\"] + CursorKey { leftSide:true; padding:0; } + FlickCharKey { + charlabel: ["7", "]", "!", "[", "\\"] + shiftedlabel:charlabel + leaves: ["7", "]", "!", "[", "\\"] + shiftedleaves:leaves } FlickCharKey { - label: layout.state == "caps" ? "[ * ]" : "[ * ]" - leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] - annotation: layout.state == "caps" ? "8V" : "8v" + charlabel:["8", "z", "x", "c", "v"] + shiftedlabel:["8", "Z", "X", "C", "V"]; + leaves:["8", "z", "x", "c", "v"] + shiftedleaves:["8", "Z", "X", "C", "V"]; } FlickCharKey { - label: layout.state == "caps" ? "BNM" : "bnm" - leaves: layout.state == "caps" ? ["9", "B", "N", "M", "/"] : ["9", "b", "n", "m", "/"] - annotation: layout.state == "caps" ? "9/" : "9/" + charlabel: ["9", ")", "?", "(", "/"] + shiftedlabel: charlabel + leaves: ["9", ")", "?", "(", "/"] + shiftedleaves:leaves } FlickCharKey { - charlabel: ["€", "₹", "£", "", "¥"] - leaves: ["€", "₹", "£", "", "¥"] + charlabel: ["~", "₹", "£", "", "¥"] + shiftedlabel:charlabel + leaves: ["~", "₹", "£", "", "¥"] + shiftedleaves:leaves } - } + } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - LanguageKey { width: panel.keyWidth; height:layout.height;} + SymojiKey { id: symojiKey;} FlickCharKey { - label: layout.state == "caps" ? "< - >" : "< - >" - leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; - annotation: layout.state == "caps" ? ",+" : ",+" - } - FlickCharKey { - label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" - leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; - annotation: layout.state == "caps" ? "0%" : "0%"; + charlabel: [",", ">", "+", "<", "-"] + shiftedlabel:charlabel + leaves: [",", ">", "+", "<", "-"] + shiftedleaves:leaves } FlickCharKey { - label: layout.state == "caps" ? "{ ? }" : "{ ? }"; - leaves: layout.state == "caps" ? [".", "{", "?", "}", "@"] : [".", "{", "?", "}", "@"]; - annotation: layout.state == "caps" ? ".@" : ".@"; + charlabel: ["0", "'", "`", "\"", "%"] + shiftedlabel:charlabel + leaves: ["0", "'", "`", "\"", "%"] + shiftedleaves:leaves } - CommitKey { id: enterKey; width: panel.keyWidth; height:layout.height } - } + FlickCharKey { + charlabel: [".", "}", "=", "{", "@"] + shiftedlabel:charlabel + leaves: [".", "}", "=", "{", "@"] + shiftedleaves:leaves + } + BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} + } + } // column - Row{ - anchors.horizontalCenter: parent.horizontalCenter; - anchors.left:parent.left - anchors.bottom:parent.bottom - spacing: 0 + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 - LayoutBar { - id: layoutBar; - width: parent.width; - height:layout.height-layout.height*0.5; - visHeight:height; - fontSize:fontSize; - } + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } } } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 821ab66c9..d4b879b71 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -23,28 +23,37 @@ KeyPad { content: c1 symbols: "languages/Keyboard_accents.qml" Column { - id: c1 - anchors.fill:parent; - property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; - spacing: 0 - Row { + id: c1 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 + anchors.fill: parent; + spacing: 0 + + Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} - FlickCharKey { - charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - annotation: layout.state == "caps" ? "1:" : "1:"; + ActionKey{ + width:panel.keyWidth; + height:layout.height; + visHeight:height; + pressedColor: fullScreenItem.theme.actionKeyColor + } + FlickCharKey { + charlabel:["1", "q", "e", "r", ":"]; + shiftedlabel:["1", "Q", "E", "R", ":"]; + leaves:["1", "q", "e", "r", ":"]; + shiftedleaves:["1", "Q", "E", "R", ":"]; } FlickCharKey { - label: layout.state == "caps" ? "TYU" : "tyu"; - leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; - annotation: layout.state == "caps" ? "2$" : "2$"; + charlabel:["2", "t", "y", "u", "g"]; + shiftedlabel:["2", "T", "Y", "U", "G"]; + leaves:["2", "t", "y", "u", "g"]; + shiftedleaves:["2", "T", "Y", "U", "G"]; } FlickCharKey { - label: layout.state == "caps" ? "IOP" : "iop"; - leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; - annotation: layout.state == "caps" ? "3#" : "3#"; + charlabel:["3", "i", "o", "m", ";"]; + shiftedlabel:["3", "I", "O", "M", ";"] + leaves:["3", "i", "o", "m", ";"]; + shiftedleaves:["3", "I", "O", "M", ";"]; } BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} } @@ -54,29 +63,36 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "!", "&", "|"] - labelleft:true - leaves: ["=", "", "!", "&", "|"] + charlabel: ["#", "", "|", "&", "_"] + shiftedlabel:charlabel + labelleft:true + leaves: ["#", "", "|", "&", "_"] + shiftedleaves:leaves } FlickCharKey { - label: layout.state == "caps" ? "AWD" : "awd"; - leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; - annotation: layout.state == "caps" ? "4S" : "4s"; + charlabel:["4", "a", "w", "d", "s"]; + shiftedlabel:["4", "A", "W", "D", "S"]; + leaves:["4", "a", "w", "d", "s"]; + shiftedleaves:["4", "A", "W", "D", "S"]; } FlickCharKey { - label: layout.state == "caps" ? "(F)" : "(f)"; - leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; - annotation: layout.state == "caps" ? "5G" : "5g"; + charlabel:["5", "b", "p", "f", "n"]; + shiftedlabel:["5", "B", "P", "F", "N"]; + leaves:["5", "b", "p", "f", "n"]; + shiftedleaves:["5", "B", "P", "F", "N"]; } FlickCharKey { - label: layout.state == "caps" ? "HKL" : "hkl"; - leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; - annotation: layout.state == "caps" ? "6J" : "6j"; + charlabel:["6", "h", "k", "l", "j"]; + shiftedlabel:["6", "H", "K", "L", "J"]; + leaves:["6", "h", "k", "l", "j"]; + shiftedleaves:["6", "H", "K", "L", "J"]; } FlickCharKey { - label: layout.state == "caps" ? "&`" : "&`" - leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" + charlabel: ["*", "€", "^", "", "$"] + shiftedlabel:charlabel + labelright:true + leaves: ["*", "€", "^", "", "$"] + shiftedleaves:leaves } } @@ -84,63 +100,74 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - SymojiKey { id: symojiKey;} - FlickCharKey { - charlabel: ["7", "]", "*", "[", "\\"] - leaves: ["7", "]", "*", "[", "\\"] + CursorKey { leftSide:true; padding:0; } + FlickCharKey { + charlabel: ["7", "]", "!", "[", "\\"] + shiftedlabel:charlabel + leaves: ["7", "]", "!", "[", "\\"] + shiftedleaves:leaves } FlickCharKey { - label: layout.state == "caps" ? "[*]" : "[*]" - leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] - annotation: layout.state == "caps" ? "8V" : "8v" + charlabel:["8", "z", "x", "c", "v"] + shiftedlabel:["8", "Z", "X", "C", "V"]; + leaves:["8", "z", "x", "c", "v"] + shiftedleaves:["8", "Z", "X", "C", "V"]; } FlickCharKey { charlabel: ["9", ")", "?", "(", "/"] + shiftedlabel: charlabel leaves: ["9", ")", "?", "(", "/"] + shiftedleaves:leaves } FlickCharKey { - charlabel: ["€", "₹", "£", "", "¥"] - leaves: ["€", "₹", "£", "", "¥"] + charlabel: ["~", "₹", "£", "", "¥"] + shiftedlabel:charlabel + leaves: ["~", "₹", "£", "", "¥"] + shiftedleaves:leaves } - } + } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - LanguageKey { id: languageMenuButton; height:layout.height;} + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: [",", ">", "+", "<", "-"] + shiftedlabel:charlabel + leaves: [",", ">", "+", "<", "-"] + shiftedleaves:leaves + } FlickCharKey { - label: layout.state == "caps" ? "< - >" : "< - >" - leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; - annotation: layout.state == "caps" ? ",+" : ",+" - } - FlickCharKey { - label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" - leaves: layout.state == "caps" ? ["0", "'", "^", "\"","%"] : ["0", "'", "^", "\"","%"]; - annotation: layout.state == "caps" ? "0%" : "0%"; + charlabel: ["0", "'", "`", "\"", "%"] + shiftedlabel:charlabel + leaves: ["0", "'", "`", "\"", "%"] + shiftedleaves:leaves } StringKey { - charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; - leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; + charlabel: [".", ".io", ".com", ".org",".net"] + shiftedlabel: [".", "}", "#", "{", "@"]; + leaves: [".", ".io", ".com", ".org",".net"] + shiftedleaves:[".", "}", "#", "{", "@"]; unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} - } + } } // column - Row{ - anchors.horizontalCenter: parent.horizontalCenter; - anchors.left:parent.left - anchors.bottom:parent.bottom - spacing: 0 + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 - LayoutBar { - id: layoutBar; - width: parent.width; - height:layout.height-layout.height*0.5; - visHeight:height; - fontSize:fontSize; - } + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } } } diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 1911663e8..0d07a4258 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -24,7 +24,7 @@ import "key_constants.js" as UI FlickActionKey { width: panel.keyWidth iconNormal:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-disabled", "", "keyboard-caps-locked"] - iconShifted:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-enabled", "", "keyboard-caps-locked"] + iconShifted:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-enabled", "", "keyboard-caps-disabled"] iconCapsLock:["keyboard-enter", "keyboard-spacebar", "keyboard-caps-locked", "", "keyboard-caps-disabled"] iconAngles:["","","","","180"] overridePressArea: true @@ -32,6 +32,7 @@ FlickActionKey { property string preedit: maliit_input_method.preedit property bool isPreedit: maliit_input_method.preedit.length > 0 property string default_state:"qertyu" + property string panelState: panel.activeKeypadState property int cursorPosition: maliit_input_method.cursorPosition property string lastChar: "" property var preeditLeaves: [lastChar] @@ -41,9 +42,7 @@ FlickActionKey { id: kana state: parent.default_state; - property string label: ""; - property string annotation:""; - states: [ + states: [ State { name: "caps" PropertyChanges { @@ -67,35 +66,49 @@ FlickActionKey { onReleased: { if (isPreedit) { - if (index != 2&& index !=4) { - if (index == 3) event_handler.onKeyReleased("", "space"); + if (index != 2 && index !=4) { + if (index == 0) event_handler.onKeyReleased("", "commit"); + if (index == 1) event_handler.onKeyReleased("", "space"); } else { var pos = cursorPosition - var newChar = (lastChar.charCodeAt(0) >= 91 && index == 2) ? lastChar.toUpperCase() : lastChar - newChar = (lastChar.charCodeAt(0) < 91 && index == 4) ? lastChar.toLowerCase() : newChar - maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) - maliit_input_method.cursorPosition = pos - } - }else{ - if (index == 0) { - //kana.state = kana.state == "caps" ? "qertyu" : "caps" - } else if (index == 2) { - kana.state = "caps" - } else if (index == 3) { - event_handler.onKeyReleased("", "space"); - } - else if (index == 4) { - kana.state = "qertyu" - } - } - if(panel.autoCapsTriggered && index != 0){ - panel.autoCapsTriggered=false; - kana.state = "qertyu" - } - if(panel.autoCapsTriggered && index ==2){ - panel.autoCapsTriggered=false; - kana.state = "caps" - } + var newChar = (lastChar.charCodeAt(0) >= 91 && index == 2) ? lastChar.toUpperCase() : lastChar + newChar = (lastChar.charCodeAt(0) < 91 && index == 4) ? lastChar.toLowerCase() : newChar + maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) + maliit_input_method.cursorPosition = pos + } + }else{ + if (index == 0) { + event_handler.onKeyReleased("", "return"); + } else if (index == 1) { + event_handler.onKeyReleased("", "space"); + } else if (index == 2) { + if (panel.state == "ACCENTS"){ + kana.state = "caps" + }else if (panelState === "NORMAL"){ + panel.activeKeypadState = "SHIFTED"; + kana.state = "caps" + } else { + panel.activeKeypadState = "CAPSLOCK"; + } + } else if (index == 4) { + if (panel.state == "ACCENTS"){ + kana.state = "qertyu" + }else if (panelState !== "NORMAL"){ + panel.activeKeypadState = "NORMAL"; + kana.state = "qertyu" + } else { + kana.state = "qertyu" + } + } + } + if(panel.autoCapsTriggered && index ==4){ + panel.autoCapsTriggered=false; + kana.state = "qertyu" + } + if(panel.autoCapsTriggered && index ==2){ + panel.autoCapsTriggered=false; + kana.state = "caps" + } } onPressed: { @@ -104,7 +117,7 @@ FlickActionKey { if (maliit_input_method.useHapticFeedback) pressEffect.start(); - if (isPreedit) { + if (isPreedit) { lastChar = preedit.charAt(cursorPosition-1) } } diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 476b5b31c..1556fa4f3 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -32,6 +32,9 @@ Item { /* to be set in keyboard layouts */ property string label: ""; property var leaves: ["", "", "", "", ""]; + property var charlabel: ["", "", "", "", ""]; + property var shiftedlabel: ["", "", "", "", ""]; + property var shiftedleaves: ["", "", "", "", ""]; property int index: keyFlickArea.index; property bool highlight: false; @@ -56,17 +59,30 @@ Item { /* icons */ property var iconNormal: ["", "", "", "", ""]; + property var iconNormalSource: ["", "", "", "", ""]; + property var iconCommon: [ + iconNormalSource[0] !== "" ? iconNormalSource[0] + : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) : "", + iconNormalSource[1] !== "" ? iconNormalSource[1] + : iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) : "", + iconNormalSource[2] !== "" ? iconNormalSource[2] + : iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) : "", + iconNormalSource[3] !== "" ? iconNormalSource[3] + : iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) : "", + iconNormalSource[4] !== "" ? iconNormalSource[4] + : iconNormal[4] ? "image://theme/%1".arg(iconNormal[4]) : "" + ]; property var iconShifted: ["", "", "", "", ""]; property var iconCapsLock: ["", "", "", "", ""]; property var iconCaps: [ - "", + iconCapsLock[0] ? "image://theme/%1".arg(iconCapsLock[0]) : "", iconCapsLock[1] ? "image://theme/%1".arg(iconCapsLock[1]) : "", iconCapsLock[2] ? "image://theme/%1".arg(iconCapsLock[2]) : "", iconCapsLock[3] ? "image://theme/%1".arg(iconCapsLock[3]) : "", iconCapsLock[4] ? "image://theme/%1".arg(iconCapsLock[4]) : "" ]; property var iconAutoCaps: [ - "", + iconShifted[0] ? "image://theme/%1".arg(iconShifted[0]) : "", iconShifted[1] ? "image://theme/%1".arg(iconShifted[1]) : "", iconShifted[2] ? "image://theme/%1".arg(iconShifted[2]) : "", iconShifted[3] ? "image://theme/%1".arg(iconShifted[3]) : "", @@ -120,7 +136,7 @@ Item { anchors.rightMargin: key.rightSide ? (parent.width - panel.keyWidth) + key.keyMargin : key.keyMargin anchors.bottomMargin: key.rowMargin radius: units.dp(4) - property int iconSize: (fullScreenItem.landscape ? (height / 2) : (height / 2.8)); + property int iconSize: !fullScreenItem.landscape ? width/4 : width/6 border{ width: borderEnabled ? units.gu(0.1) : 0 color: borderColor @@ -169,11 +185,10 @@ Item { Icon { id: iconImage - source: iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) - : "" + source: iconCommon[0] color: fullScreenItem.theme.selectionColor anchors.horizontalCenter: parent.horizontalCenter - visible: (iconNormal[0] != "" && !panel.hideKeyLabels) + visible: (iconCommon[0] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[0]} @@ -181,7 +196,7 @@ Item { Text { id: tapLabel - text: (panel.hideKeyLabels)?"":charlabel[0] + text: (panel.activeKeypadState === "NORMAL")?charlabel[0]:shiftedlabel[0] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily @@ -189,7 +204,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.selectionColor textFormat: Text.StyledText - visible: !iconImage.visible + visible:!iconImageLeft.visible && !panel.hideKeyLabels } } @@ -202,11 +217,10 @@ Item { Icon { id: iconImageLeft - source: iconNormal[1] ? "image://theme/%1".arg(iconNormal[1]) - : "" + source: iconCommon[1] color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter - visible: (iconNormal[1] != "" && !panel.hideKeyLabels) + visible: (iconCommon[1] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[1]} @@ -214,7 +228,7 @@ Item { Text { id: middleLeftLabel - text: (panel.hideKeyLabels)?"":charlabel[1] + text: (panel.activeKeypadState === "NORMAL")?charlabel[1]:shiftedlabel[1] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily @@ -222,7 +236,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageLeft.visible + visible: !iconImageLeft.visible && !panel.hideKeyLabels } } } @@ -235,12 +249,11 @@ Item { Icon { id: iconImageUp - source: iconNormal[2] ? "image://theme/%1".arg(iconNormal[2]) - : "" + source: iconCommon[2] color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter - visible: (iconNormal[2] != "" && !panel.hideKeyLabels) + visible: (iconCommon[2] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[2]} @@ -248,7 +261,7 @@ Item { Text { id: topCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[2] + text: (panel.activeKeypadState === "NORMAL")?charlabel[2]:shiftedlabel[2]; anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily @@ -256,7 +269,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageUp.visible + visible: !iconImageUp.visible && !panel.hideKeyLabels } Text { id: keyLabel @@ -285,13 +298,12 @@ Item { Icon { id: iconImageDown - source: iconNormal[4] ? "image://theme/%1".arg(iconNormal[4]) - : "" + source: iconCommon[4] color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: units.gu(0.25) - visible: (iconNormal[4] != "" && !panel.hideKeyLabels) + visible: (iconCommon[4] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[4]} @@ -299,7 +311,7 @@ Item { Text { id: bottomCenterLabel - text: (panel.hideKeyLabels)?"":charlabel[4] + text: (panel.activeKeypadState === "NORMAL")?charlabel[4]:shiftedlabel[4] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter anchors.bottom: parent.bottom @@ -309,7 +321,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageDown.visible + visible: !iconImageDown.visible && !panel.hideKeyLabels } } @@ -322,11 +334,10 @@ Item { Icon { id: iconImageRight - source: iconNormal[3] ? "image://theme/%1".arg(iconNormal[3]) - : "" + source: iconCommon[3] color: key.colorNormal anchors.horizontalCenter: parent.horizontalCenter - visible: (iconNormal[3] != "" && !panel.hideKeyLabels) + visible: (iconCommon[3] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[3]} @@ -334,7 +345,7 @@ Item { Text { id: middleRightLabel - text: (panel.hideKeyLabels)?"":charlabel[3] + text: (panel.activeKeypadState === "NORMAL")?charlabel[3]:shiftedlabel[3] anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily @@ -342,7 +353,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageRight.visible + visible: !iconImageRight.visible && !panel.hideKeyLabels } } } @@ -371,8 +382,8 @@ Item { anchors.bottomMargin: key.height * 0.5 width: units.gu((UI.fontSize + UI.flickMargin) * 3) height: units.gu((UI.fontSize + UI.flickMargin) * 3) - chars: leaves - icons:iconNormal + chars: (panel.activeKeypadState === "NORMAL")?leaves:shiftedleaves + icons: iconCommon angles:iconAngles popFontSize: leavesFontSize index: keyFlickArea.index @@ -389,12 +400,16 @@ Item { key.released(); return; } - event_handler.onKeyReleased(leaves[index], action); - if(panel.autoCapsTriggered){ + event_handler.onKeyReleased(flickPop.chars[index], action); + if(panel.autoCapsTriggered){ panel.autoCapsTriggered=false; + }else if (!skipAutoCaps) { + if (panel.activeKeypadState === "SHIFTED" && panel.state === "CHARACTERS"){ + panel.activeKeypadState = "NORMAL"; + key.state = "qertyu" + } } - - } + } onPressed: { if (overridePressArea) { @@ -408,7 +423,11 @@ Item { if (maliit_input_method.useHapticFeedback) pressEffect.start(); - event_handler.onKeyPressed(leaves[index], action); + if(action != "backspace") { + panel.autoCapsTriggered = false; + key.state = "qertyu" + } + event_handler.onKeyPressed(flickPop.chars[index], action); } } @@ -421,35 +440,70 @@ Item { } // make sure the icon changes even if the property icon* change on runtime - state: panel.activeKeypadState - states: [ - State { - name: "caps" - - PropertyChanges { - target: flickPop - icons: panel.autoCapsTriggered ? iconShifted : iconCapsLock - } - PropertyChanges { - target: iconImageUp - source: panel.autoCapsTriggered ? iconAutoCaps[2] : iconCaps[2] - color: key.colorShifted - } - PropertyChanges { - target: iconImageDown - source: panel.autoCapsTriggered ? iconAutoCaps[4] : iconCaps[4] - color: key.colorShifted - } - PropertyChanges { - target: iconImageLeft - source: panel.autoCapsTriggered ? iconAutoCaps[1] : iconCaps[1] - color: key.colorShifted - } - PropertyChanges { - target: iconImageRight - source: panel.autoCapsTriggered ? iconAutoCaps[3] : iconCaps[3] - color: key.colorShifted - } - } - ] + state: panel.activeKeypadState + states: [ + State { + name: "NORMAL" + PropertyChanges { + target: flickPop + icons: iconCommon + } + PropertyChanges { + target: iconImage + source: iconCommon[0] + } + PropertyChanges { + target: iconImageUp + source: iconCommon[2] + color: key.colorShifted + } + PropertyChanges { + target: iconImageDown + source: iconCommon[4] + color: key.colorShifted + } + PropertyChanges { + target: iconImageLeft + source: iconCommon[1] + color: key.colorShifted + } + PropertyChanges { + target: iconImageRight + source: iconCommon[3] + color: key.colorShifted + } + }, + State { + name: "caps" + PropertyChanges { + target: flickPop + icons: iconAutoCaps + } + PropertyChanges { + target: iconImage + source: iconAutoCaps[0] + color: key.colorShifted + } + PropertyChanges { + target: iconImageUp + source: iconAutoCaps[2] + color: key.colorShifted + } + PropertyChanges { + target: iconImageDown + source: panel.autoCapsTriggered ? iconCommon[4] : iconAutoCaps[4] + color: key.colorShifted + } + PropertyChanges { + target: iconImageLeft + source: iconAutoCaps[1] + color: key.colorShifted + } + PropertyChanges { + target: iconImageRight + source: iconAutoCaps[3] + color: key.colorShifted + } + } + ] } diff --git a/qml/keys/FlickPop.qml b/qml/keys/FlickPop.qml index ad014cc4c..410124790 100644 --- a/qml/keys/FlickPop.qml +++ b/qml/keys/FlickPop.qml @@ -38,56 +38,55 @@ Item { FlickPopKey { id: center labelChar: chars[0] ? chars[0] : "" - labelIcon: icons[0] ? icons[0] : "" + labelIcon: icons[0] ? icons[0] : "" anchors.centerIn: parent labelOpacity: index == 0 ? 1.0 : 0.6 - labelAngle: angles[0] ? angles[0] : "" + labelAngle: angles[0] ? angles[0] : "" labelColor: index == 0 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor - labelFontSize: popFontSize + labelFontSize: popFontSize } FlickPopKey { labelChar: chars[1] ? chars[1] : "" - labelIcon:icons[1] ? icons[1] : "" - + labelIcon:icons[1] ? icons[1] : "" anchors.verticalCenter: center.verticalCenter anchors.right: center.left labelOpacity: index == 1 ? 1.0 : 0.6 - labelAngle: angles[1] ? angles[1] : "" + labelAngle: angles[1] ? angles[1] : "" labelColor: index == 1 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor - labelFontSize: popFontSize + labelFontSize: popFontSize } FlickPopKey { labelChar: chars[2] ? chars[2] : "" - labelIcon:icons[2] ? icons[2] : "" + labelIcon:icons[2] ? icons[2] : "" anchors.horizontalCenter: center.horizontalCenter anchors.bottom: center.top labelOpacity: index == 2 ? 1.0 : 0.6 - labelAngle: angles[2] ? angles[2] : "" + labelAngle: angles[2] ? angles[2] : "" labelColor: index == 2 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor - labelFontSize: popFontSize + labelFontSize: popFontSize } FlickPopKey { labelChar: chars[3] ? chars[3] : "" - labelIcon:icons[3] ? icons[3] : "" + labelIcon:icons[3] ? icons[3] : "" anchors.verticalCenter: center.verticalCenter anchors.left: center.right labelOpacity: index == 3 ? 1.0 : 0.6 - labelAngle: angles[3] ? angles[3] : "" + labelAngle: angles[3] ? angles[3] : "" labelColor: index == 3 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor - labelFontSize: popFontSize + labelFontSize: popFontSize } FlickPopKey { labelChar: chars[4] ? chars[4] : "" - labelIcon:icons[4] ? icons[4] : "" + labelIcon:icons[4] ? icons[4] : "" anchors.horizontalCenter: center.horizontalCenter anchors.top: center.bottom labelOpacity: index == 4 ? 1.0 : 0.6 - labelAngle: angles[4] ? angles[4] : "" + labelAngle: angles[4] ? angles[4] : "" labelColor: index == 4 ? fullScreenItem.theme.selectionColor : fullScreenItem.theme.fontColor - labelFontSize: popFontSize + labelFontSize: popFontSize } } diff --git a/qml/keys/FlickPopKey.qml b/qml/keys/FlickPopKey.qml index 8666ab65c..17d0a0fc7 100644 --- a/qml/keys/FlickPopKey.qml +++ b/qml/keys/FlickPopKey.qml @@ -47,7 +47,7 @@ Rectangle { } Icon { anchors.centerIn: parent - source: parent.labelIcon ? "image://theme/%1".arg(parent.labelIcon):"" + source: parent.labelIcon ? parent.labelIcon : "" color: parent.labelColor opacity: parent.labelOpacity transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:labelAngle} diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 84e9a520f..6e9c5c215 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -19,20 +19,41 @@ import QtQuick 2.4 import "key_constants.js" as UI FlickActionKey { - charlabel: (panel.state == "SYMBOLS") ? ["abc", "", "", "😀", ""]:["àþç", "", "", "😀", ""] - leaves: (panel.state == "SYMBOLS") ? ["abc", "", "", "😀", ""]:["àþç", "", "", "😀", ""] + charlabel: (panel.state == "ACCENTS") ? ["", "", "", "", "abc"]:["", "", "ã。", "", "āñ‽"] + leaves: (panel.state == "ACCENTS") ? ["", "", "", "", "abc"]:["", "", "ã。", "", "āñ‽"] + iconNormal: ["language-chooser", "", "", "", ""] + iconNormalSource: ["", "", "", "../images/happy.svg", ""] leavesFontSize: 30; + shiftedlabel: charlabel + shiftedleaves: leaves width: panel.keyWidth; action: "symbols"; overridePressArea: true; onReleased: { - if (index == 0) { - panel.state = (panel.state == "CHARACTERS") ? "SYMBOLS" : "CHARACTERS"; - } else if (index == 3) { - panel.state = (panel.state == "CHARACTERS") ? "EMOJI" : "CHARACTERS"; - } + if (index == 0) { + if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { + maliit_input_method.activeLanguage = maliit_input_method.previousLanguage + } else if(panel.state == "ACCENTS") { + Qt.openUrlExternally("settings:///system/language") + maliit_input_method.hide(); + } else { + canvas.languageMenuShown = true + } + } else if (index == 2) { + panel.state = (panel.activeKeypadState == "NORMAL") ? "ACCENTS" : "CHARACTERS"; + panel.activeKeypadState = (panel.activeKeypadState == "NORMAL" && panel.state == "ACCENTS") ? "CAPSLOCK" : "NORMAL"; + } else if (index == 3) { + panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; + } else if (index == 4) { + if(panel.state == "ACCENTS" && panel.activeKeypadState == "CAPSLOCK"){ + panel.activeKeypadState = "NORMAL"; + panel.state = "ACCENTS"; + } else { + panel.state = panel.state == "CHARACTERS" ? "ACCENTS" : "CHARACTERS"; + } + } } onPressed: { if (maliit_input_method.useAudioFeedback) From 4ae5e0839500d06a0e702f6199a25955c8dcc85c Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 6 May 2020 00:48:03 -0300 Subject: [PATCH 28/57] add a emoji icon on the symojikey --- qml/images/happy.svg | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 qml/images/happy.svg diff --git a/qml/images/happy.svg b/qml/images/happy.svg new file mode 100644 index 000000000..134c63eda --- /dev/null +++ b/qml/images/happy.svg @@ -0,0 +1,8 @@ + + + + + + + + From ba9a6358671774c44db14bffcbfa98c673b16142 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 6 May 2020 00:48:43 -0300 Subject: [PATCH 29/57] fix bind loop on source for accents layout --- qml/KeyboardContainer.qml | 16 +++++++++++++++- qml/keys/KeyPad.qml | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/qml/KeyboardContainer.qml b/qml/KeyboardContainer.qml index 3e16c3b66..c489e5449 100644 --- a/qml/KeyboardContainer.qml +++ b/qml/KeyboardContainer.qml @@ -48,7 +48,7 @@ Item { objectName: "characterKeyPadLoader" anchors.fill: parent asynchronous: false - source: panel.state === "CHARACTERS" ? internal.characterKeypadSource : internal.symbolKeypadSource + source: internal.loadKeypad(); onLoaded: { if (delayedAutoCaps) { activeKeypadState = "SHIFTED"; @@ -76,6 +76,9 @@ Item { }, State { name: "SYMBOLS" + }, + State { + name: "ACCENTS" } ] @@ -90,11 +93,22 @@ Item { property string characterKeypadSource: loadLayout(maliit_input_method.contentType, maliit_input_method.activeLanguage) property string symbolKeypadSource: activeKeypad ? activeKeypad.symbols : "" + property string accentsKeypadSource: activeKeypad ? activeKeypad.accents : "" onCharacterKeypadSourceChanged: { panel.state = "CHARACTERS"; } + function loadKeypad() { + if (panel.state === "CHARACTERS" ) { + return characterKeypadSource; + } else if (panel.state === "ACCENTS") { + return accentsKeypadSource; + } else { + return symbolKeypadSource; + } + } + function loadLayout(contentType, activeLanguage) { var language = activeLanguage.toLowerCase(); diff --git a/qml/keys/KeyPad.qml b/qml/keys/KeyPad.qml index b4f0c87a1..00d538fa2 100644 --- a/qml/keys/KeyPad.qml +++ b/qml/keys/KeyPad.qml @@ -22,7 +22,8 @@ Item { state: "NORMAL" property var content: c1 - property string symbols: "languages/Keyboard_symbols.qml" + property string symbols: "languages/Keyboard_symbols.qml"; + property string accents: "languages/Keyboard_accents.qml"; property bool capsLock: false Column { From fc3b595f7dbe30c3cf7d1b9f1ad279715549aeaa Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 9 May 2020 22:45:10 -0300 Subject: [PATCH 30/57] allow the caseswitchkey to function as shiftkey --- qml/keys/CaseSwitchKey.qml | 49 +++++--------------------------------- qml/keys/FlickCharKey.qml | 39 +++++++++++------------------- 2 files changed, 20 insertions(+), 68 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 0d07a4258..213b97824 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -31,38 +31,10 @@ FlickActionKey { property string preedit: maliit_input_method.preedit property bool isPreedit: maliit_input_method.preedit.length > 0 - property string default_state:"qertyu" property string panelState: panel.activeKeypadState property int cursorPosition: maliit_input_method.cursorPosition property string lastChar: "" property var preeditLeaves: [lastChar] - state:(panel.autoCapsTriggered)?"caps": kana.state - - Item { - id: kana - - state: parent.default_state; - states: [ - State { - name: "caps" - PropertyChanges { - target: kana; - label: ""; - annotation:"ⓐ"; - state: "caps"; - } - }, - State { - name: "qertyu" - PropertyChanges { - target: kana; - label: (panel.autoCapsTriggered)?"": "Ⓐ"; - annotation:(panel.autoCapsTriggered)?"ⓐ":""; - state: "qertyu"; - } - } - ] - } onReleased: { if (isPreedit) { @@ -71,8 +43,8 @@ FlickActionKey { if (index == 1) event_handler.onKeyReleased("", "space"); } else { var pos = cursorPosition - var newChar = (lastChar.charCodeAt(0) >= 91 && index == 2) ? lastChar.toUpperCase() : lastChar - newChar = (lastChar.charCodeAt(0) < 91 && index == 4) ? lastChar.toLowerCase() : newChar + var newChar = (index == 2) ? lastChar.toUpperCase() : lastChar + newChar = (index == 4) ? lastChar.toLowerCase() : newChar maliit_input_method.preedit = preedit.substr(0, cursorPosition-1) + newChar + preedit.substr(cursorPosition) maliit_input_method.cursorPosition = pos } @@ -82,32 +54,23 @@ FlickActionKey { } else if (index == 1) { event_handler.onKeyReleased("", "space"); } else if (index == 2) { - if (panel.state == "ACCENTS"){ - kana.state = "caps" - }else if (panelState === "NORMAL"){ + if (panelState === "NORMAL"){ panel.activeKeypadState = "SHIFTED"; - kana.state = "caps" } else { panel.activeKeypadState = "CAPSLOCK"; } } else if (index == 4) { - if (panel.state == "ACCENTS"){ - kana.state = "qertyu" - }else if (panelState !== "NORMAL"){ + if (panelState !== "NORMAL") panel.activeKeypadState = "NORMAL"; - kana.state = "qertyu" - } else { - kana.state = "qertyu" - } } } if(panel.autoCapsTriggered && index ==4){ panel.autoCapsTriggered=false; - kana.state = "qertyu" + panel.activeKeypadState = "NORMAL"; } if(panel.autoCapsTriggered && index ==2){ panel.autoCapsTriggered=false; - kana.state = "caps" + panel.activeKeypadState = "CAPSLOCK"; } } diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 1556fa4f3..e237c476c 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -406,7 +406,6 @@ Item { }else if (!skipAutoCaps) { if (panel.activeKeypadState === "SHIFTED" && panel.state === "CHARACTERS"){ panel.activeKeypadState = "NORMAL"; - key.state = "qertyu" } } } @@ -425,7 +424,6 @@ Item { if(action != "backspace") { panel.autoCapsTriggered = false; - key.state = "qertyu" } event_handler.onKeyPressed(flickPop.chars[index], action); } @@ -443,66 +441,57 @@ Item { state: panel.activeKeypadState states: [ State { - name: "NORMAL" + name: "SHIFTED" PropertyChanges { target: flickPop - icons: iconCommon + icons: iconAutoCaps } PropertyChanges { target: iconImage - source: iconCommon[0] + source: iconAutoCaps[0] } PropertyChanges { target: iconImageUp - source: iconCommon[2] - color: key.colorShifted + source: iconAutoCaps[2] } PropertyChanges { target: iconImageDown - source: iconCommon[4] - color: key.colorShifted + source: iconAutoCaps[4] } PropertyChanges { target: iconImageLeft - source: iconCommon[1] - color: key.colorShifted + source: iconAutoCaps[1] } PropertyChanges { target: iconImageRight - source: iconCommon[3] - color: key.colorShifted + source: iconAutoCaps[3] } }, State { - name: "caps" + name: "CAPSLOCK" PropertyChanges { target: flickPop - icons: iconAutoCaps + icons: iconCaps } PropertyChanges { target: iconImage - source: iconAutoCaps[0] - color: key.colorShifted + source: iconCaps[0] } PropertyChanges { target: iconImageUp - source: iconAutoCaps[2] - color: key.colorShifted + source: iconCaps[2] } PropertyChanges { target: iconImageDown - source: panel.autoCapsTriggered ? iconCommon[4] : iconAutoCaps[4] - color: key.colorShifted + source: iconCaps[4] } PropertyChanges { target: iconImageLeft - source: iconAutoCaps[1] - color: key.colorShifted + source: iconCaps[1] } PropertyChanges { target: iconImageRight - source: iconAutoCaps[3] - color: key.colorShifted + source: iconCaps[3] } } ] From 768942f797fec87e5986e14b6e0c1bfb48275476 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 9 May 2020 22:46:12 -0300 Subject: [PATCH 31/57] fix stringkey sizing --- plugins/en@flick/qml/Keyboard_en@flick_email.qml | 4 ++-- qml/keys/StringKey.qml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index d4b879b71..9168c2389 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -145,11 +145,11 @@ KeyPad { shiftedleaves:leaves } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"] + charlabel: [".", ".io", ".com", ".org",".net"] shiftedlabel: [".", "}", "#", "{", "@"]; leaves: [".", ".io", ".com", ".org",".net"] shiftedleaves:[".", "}", "#", "{", "@"]; - unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } diff --git a/qml/keys/StringKey.qml b/qml/keys/StringKey.qml index 8184bf633..f5d54c96d 100644 --- a/qml/keys/StringKey.qml +++ b/qml/keys/StringKey.qml @@ -26,7 +26,6 @@ FlickCharKey { overridePressArea: true - fontSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize) onReleased: { event_handler.onKeyReleased(unstyledLeaves[index], action); } From 3665a7c03a63ad71ae8da345059ebb321ec37d16 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 9 May 2020 22:46:43 -0300 Subject: [PATCH 32/57] standardize symojikey relative to caseswitchkey --- qml/keys/SymojiKey.qml | 55 ++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 6e9c5c215..f5829f3cf 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -19,10 +19,11 @@ import QtQuick 2.4 import "key_constants.js" as UI FlickActionKey { - charlabel: (panel.state == "ACCENTS") ? ["", "", "", "", "abc"]:["", "", "ã。", "", "āñ‽"] - leaves: (panel.state == "ACCENTS") ? ["", "", "", "", "abc"]:["", "", "ã。", "", "āñ‽"] - iconNormal: ["language-chooser", "", "", "", ""] - iconNormalSource: ["", "", "", "../images/happy.svg", ""] + id: symojiKey + charlabel: (panel.state == "CHARACTERS") ? ["", "", "¡ä", "", ""] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "ñ", "", "a!"] + leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "ñ", "", "a!"] + iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", "navigation-menu"] : ["settings", "", "", "", ""] + iconNormalSource: ["", "", "", "happy.svg", ""] leavesFontSize: 30; shiftedlabel: charlabel shiftedleaves: leaves @@ -30,29 +31,53 @@ FlickActionKey { action: "symbols"; overridePressArea: true; + property string default_state:"signs" + state: diacritics.state + + Item { + id: diacritics + + state: parent.default_state; + states: [ + State { + name: "marks" + PropertyChanges { + target: diacritics; + state: "marks"; + } + }, + State { + name: "signs" + PropertyChanges { + target: diacritics; + state: "signs"; + } + } + ] + } onReleased: { if (index == 0) { if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { - maliit_input_method.activeLanguage = maliit_input_method.previousLanguage + maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; } else if(panel.state == "ACCENTS") { - Qt.openUrlExternally("settings:///system/language") + Qt.openUrlExternally("settings:///system/language"); maliit_input_method.hide(); } else { - canvas.languageMenuShown = true + canvas.languageMenuShown = true; } } else if (index == 2) { - panel.state = (panel.activeKeypadState == "NORMAL") ? "ACCENTS" : "CHARACTERS"; - panel.activeKeypadState = (panel.activeKeypadState == "NORMAL" && panel.state == "ACCENTS") ? "CAPSLOCK" : "NORMAL"; + if (panel.state == "ACCENTS") + state = "marks"; + else + panel.state = "ACCENTS"; } else if (index == 3) { panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; } else if (index == 4) { - if(panel.state == "ACCENTS" && panel.activeKeypadState == "CAPSLOCK"){ - panel.activeKeypadState = "NORMAL"; - panel.state = "ACCENTS"; - } else { - panel.state = panel.state == "CHARACTERS" ? "ACCENTS" : "CHARACTERS"; - } + if (panel.state == "CHARACTERS") + canvas.languageMenuShown = true; + else + panel.state = "CHARACTERS"; } } onPressed: { From b8bd0d715082dced1e0d1d2b159232fb7ef8e48f Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 10 May 2020 21:18:13 -0300 Subject: [PATCH 33/57] flesh out the accents layout --- qml/languages/Keyboard_accents.qml | 144 +++++++++++++++++------------ 1 file changed, 87 insertions(+), 57 deletions(-) diff --git a/qml/languages/Keyboard_accents.qml b/qml/languages/Keyboard_accents.qml index f3f4df081..9ad5da5cc 100644 --- a/qml/languages/Keyboard_accents.qml +++ b/qml/languages/Keyboard_accents.qml @@ -21,28 +21,33 @@ KeyPad { anchors.fill: parent; content: c1 - symbols: "languages/Keyboard_emoji.qml" Column { id: c1 - property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 anchors.fill: parent; - spacing: 0 + spacing: 0 Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} - FlickCharKey { - charlabel: layout.state == "caps" ? ["1", "À", "Â", "Á", "Ä"] : ["1", "à", "â", "á", "ä"]; - leaves: layout.state == "caps" ? ["1", "À", "Â", "Á", "Ä"] : ["1", "à", "â", "á", "ä"]; + ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} + FlickCharKey { + charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]: ["ã", "à", "â", "á", "ä"]; + leaves: charlabel + shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] : ["Ã", "À", "Â", "Á", "Ä"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["2", "Ù", "Û", "Ú", "Ü"] : ["2", "ù", "û", "ú", "ü"]; - leaves: layout.state == "caps" ? ["2", "Ù", "Û", "Ú", "Ü"] : ["2", "ù", "û", "ú", "ü"]; + charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] : ["ũ", "ù", "û", "ú", "ü"]; + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] : ["Ũ", "Ù", "Û", "Ú", "Ü"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["3", "Å", "Æ", "Ý", "Œ"] : ["3", "å", "æ", "ý", "œ"]; - leaves: layout.state == "caps" ? ["3", "Å", "Æ", "Ý", "Œ"] : ["3", "å", "æ", "ý", "œ"]; + charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] : ["õ", "ò", "ô", "ó", "ö"]; + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] : ["Õ", "Ò", "Ô", "Ó", "Ö"]; + shiftedleaves: shiftedlabel } CaseSwitchKey { id: layout; labelright:true} } @@ -52,26 +57,36 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "±", "÷", "×"] - labelleft:true - leaves: ["=", "", "±", "÷", "×"] + charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["√", "", "±", "÷", "×"] + labelleft:true + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : ["✿", "", "∆", "。", "﹏"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["4", "È", "Ê", "É", "Ë"] : ["4", "è", "ê", "é", "ë"]; - leaves: layout.state == "caps" ? ["4", "È", "Ê", "É", "Ë"] : ["4", "è", "ê", "é", "ë"]; + charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] : ["ẽ", "è", "ê", "é", "ë"]; + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] : ["Ẽ", "È", "Ê", "É", "Ë"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["5", "Ì", "Î", "Í", "Ï"] : ["5", "ì", "î", "í", "ï"]; - leaves: layout.state == "caps" ? ["5", "Ì", "Î", "Í", "Ï"] : ["5", "ì", "î", "í", "ï"]; + charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] : ["ĩ", "ì", "î", "í", "ï"]; + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] : ["Ĩ", "Ì", "Î", "Í", "Ï"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["6", "Ò", "Ô", "Ó", "Ö"] : ["6", "ò", "ô", "ó", "ö"]; - leaves: layout.state == "caps" ? ["6", "Ò", "Ô", "Ó", "Ö"] : ["6", "ò", "ô", "ó", "ö"]; + charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]: ["ỹ", "ỳ", "ŷ", "ý", "ÿ"]; + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] : ["Ỹ", "Ỳ", "Ŷ", "Ý", "Ÿ"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["~", "™", "©", "", "®"] - labelright:true - leaves: ["~", "™", "©", "", "®"] + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["‾", "™", "©", "", "®"]; + labelright:true + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : ["ʖ", "๑", " ͡", "", " ͜"]; + shiftedleaves: shiftedlabel } } @@ -80,59 +95,74 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - SymojiKey { id: symojiKey;} - FlickCharKey { - charlabel: ["7", "»", "–", "«", "—"] - leaves: ["7", "»", "–", "«", "—"] + CursorKey { leftSide:true; padding: 0 } + FlickCharKey { + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["–", "»", "—", "«", "…"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : ["ง", "ᕙ", "∀", "ᕗ", "⊸"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: layout.state == "caps" ? ["8", "Ð", "Ñ", "Þ", "Ç"] : ["8", "ð", "ñ", "þ", "ç"] - leaves: layout.state == "caps" ? ["8", "Ð", "Ñ", "Þ", "Ç"] : ["8", "ð", "ñ", "þ", "ç"] + charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] : ["ñ", "ņ", "ṅ", "ń", "ň"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] : ["Ñ", "Ń", "Ṅ", "Ņ", "Ň"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["9", "♪", "√", "☆", "…"] - leaves: ["9", "♪", "√", "☆", "…"] + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["¨", "♪", "¤", "☆", "✧"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : ["ノ", "≧", "人", "≦", "ڡ"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["€", "₹", "£", "", "¥"] - leaves: ["€", "₹", "£", "", "¥"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["¢", "ſ", "ı", "", "ð"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : ["•", "ẙ", "·", "", "∴"]; + shiftedleaves: shiftedlabel } - } + } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - LanguageKey { width: panel.keyWidth; visHeight:layout.height;} + SymojiKey { id: symojiKey;} + FlickCharKey { - charlabel: [",", "“", "•", "”", "„"] - leaves: [",", "“", "•", "”", "„"] - } - FlickCharKey { - charlabel: ["0", "§", "ª", "ß", "°"] - leaves: ["0", "§", "ª", "ß", "°"] + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : ["≠", "§", "ª", "ß", "°"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : ["つ", "’̀", "ツ", "‘́", "ヮ"]; + shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: [".", "¡", "‽", "¿", "⸘"] - leaves: [".", "¡", "‽", "¿", "⸘"] - } + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["¦", "“", "‰", "”", "„"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : ["∇", "╰", "「", "╯", "┐"]; + shiftedleaves: shiftedlabel + } + FlickCharKey { + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : ["´", "¡", "‽", "¿", "⸘"] + leaves: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : ["∠", "☜", "゚", "☞", "」"]; + shiftedleaves: shiftedlabel + } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} - } + } } // column - Row{ - anchors.horizontalCenter: parent.horizontalCenter; - anchors.left:parent.left - anchors.bottom:parent.bottom - spacing: 0 + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 - LayoutBar { - id: layoutBar; - width: parent.width; - height:layout.height-layout.height*0.5; - visHeight:height; - fontSize:fontSize; - } + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } } } From 8091c8e4ca3825b6b1f6f5d25f605419cd54e040 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 10 May 2020 21:30:42 -0300 Subject: [PATCH 34/57] layout tweaks --- plugins/en@flick/qml/Keyboard_en@flick.qml | 17 ++++++++--------- .../en@flick/qml/Keyboard_en@flick_email.qml | 12 ++++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index f5f0ba213..421bef52f 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -21,7 +21,6 @@ KeyPad { anchors.fill: parent; content: c1 - symbols: "languages/Keyboard_accents.qml" Column { id: c1 property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 @@ -63,10 +62,10 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "|", "&", "_"] + charlabel: ["#", "", "+", "~", "-"] shiftedlabel:charlabel labelleft:true - leaves: ["#", "", "|", "&", "_"] + leaves: ["#", "", "+", "~", "-"] shiftedleaves:leaves } FlickCharKey { @@ -133,9 +132,9 @@ KeyPad { shiftedleaves:leaves } FlickCharKey { - charlabel: ["~", "₹", "£", "", "¥"] + charlabel: ["=", "₹", "£", "", "¥"] shiftedlabel:charlabel - leaves: ["~", "₹", "£", "", "¥"] + leaves: ["=", "₹", "£", "", "¥"] shiftedleaves:leaves } } @@ -146,9 +145,9 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "+", "<", "-"] + charlabel: [",", ">", "&", "<", "_"] shiftedlabel:charlabel - leaves: [",", ">", "+", "<", "-"] + leaves: [",", ">", "&", "<", "_"] shiftedleaves:leaves } FlickCharKey { @@ -158,9 +157,9 @@ KeyPad { shiftedleaves:leaves } FlickCharKey { - charlabel: [".", "}", "=", "{", "@"] + charlabel: [".", "}", "|", "{", "@"] shiftedlabel:charlabel - leaves: [".", "}", "=", "{", "@"] + leaves: [".", "}", "|", "{", "@"] shiftedleaves:leaves } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 9168c2389..41bbca3e7 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -63,10 +63,10 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "|", "&", "_"] + charlabel: ["#", "", "+", "~", "-"] shiftedlabel:charlabel labelleft:true - leaves: ["#", "", "|", "&", "_"] + leaves: ["#", "", "+", "~", "-"] shiftedleaves:leaves } FlickCharKey { @@ -120,9 +120,9 @@ KeyPad { shiftedleaves:leaves } FlickCharKey { - charlabel: ["~", "₹", "£", "", "¥"] + charlabel: ["=", "₹", "£", "", "¥"] shiftedlabel:charlabel - leaves: ["~", "₹", "£", "", "¥"] + leaves: ["=", "₹", "£", "", "¥"] shiftedleaves:leaves } } @@ -133,9 +133,9 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "+", "<", "-"] + charlabel: [",", ">", "&", "<", "_"] shiftedlabel:charlabel - leaves: [",", ">", "+", "<", "-"] + leaves: [",", ">", "&", "<", "_"] shiftedleaves:leaves } FlickCharKey { From 221800ba18907e3cabfd2a5069a04a926f131424 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 10 May 2020 21:31:06 -0300 Subject: [PATCH 35/57] get symoji and caseswitchkey to follow the same convention --- qml/keys/CaseSwitchKey.qml | 2 +- qml/keys/SymojiKey.qml | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/qml/keys/CaseSwitchKey.qml b/qml/keys/CaseSwitchKey.qml index 213b97824..e7f499cc7 100644 --- a/qml/keys/CaseSwitchKey.qml +++ b/qml/keys/CaseSwitchKey.qml @@ -57,7 +57,7 @@ FlickActionKey { if (panelState === "NORMAL"){ panel.activeKeypadState = "SHIFTED"; } else { - panel.activeKeypadState = "CAPSLOCK"; + panel.activeKeypadState = panel.activeKeypadState == "CAPSLOCK" ? "SHIFTED" : "CAPSLOCK"; } } else if (index == 4) { if (panelState !== "NORMAL") diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index f5829f3cf..a5115b795 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,9 +20,9 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey - charlabel: (panel.state == "CHARACTERS") ? ["", "", "¡ä", "", ""] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "ñ", "", "a!"] - leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "ñ", "", "a!"] - iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", "navigation-menu"] : ["settings", "", "", "", ""] + charlabel: (panel.state == "CHARACTERS") ? ["", "", "¡ä", "", ""] : (state == "marks") ? ["", "", "¡ä", "", "a!"] : ["", "", "īø", "", "a!"] + leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "¡ä", "", "a!"] : ["", "", "īø", "", "a!"] + iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "happy.svg", ""] leavesFontSize: 30; shiftedlabel: charlabel @@ -61,22 +61,23 @@ FlickActionKey { if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; } else if(panel.state == "ACCENTS") { - Qt.openUrlExternally("settings:///system/language"); - maliit_input_method.hide(); + if (state == "marks"){ + Qt.openUrlExternally("settings:///system/language"); + maliit_input_method.hide(); + }else { + canvas.languageMenuShown = true; + } } else { canvas.languageMenuShown = true; } } else if (index == 2) { if (panel.state == "ACCENTS") - state = "marks"; + state = state == "marks" ? "signs" : "marks"; else panel.state = "ACCENTS"; } else if (index == 3) { panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; } else if (index == 4) { - if (panel.state == "CHARACTERS") - canvas.languageMenuShown = true; - else panel.state = "CHARACTERS"; } } From e991fc9497f5393db1ace439e2fb278124a9e284 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Fri, 18 Dec 2020 21:15:41 -0300 Subject: [PATCH 36/57] ship plugin lib for english flick --- plugins/en@flick/src/src.pro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/en@flick/src/src.pro b/plugins/en@flick/src/src.pro index 81d0f619e..7415dbdde 100644 --- a/plugins/en@flick/src/src.pro +++ b/plugins/en@flick/src/src.pro @@ -22,6 +22,9 @@ EXAMPLE_FILES = englishflickplugin.json # generate database for presage: PLUGIN_INSTALL_PATH = $${UBUNTU_KEYBOARD_LIB_DIR}/en@flick/ +target.path = $$PLUGIN_INSTALL_PATH +INSTALLS += target + OTHER_FILES += \ englishflickplugin.json From 58191f01aa67dde9ed606c4624f9743b4fac88a1 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Mon, 21 Dec 2020 15:14:12 -0300 Subject: [PATCH 37/57] optimize layout code --- plugins/en@flick/qml/Keyboard_en@flick.qml | 74 +++++++++---------- .../en@flick/qml/Keyboard_en@flick_email.qml | 69 +++++++++-------- qml/languages/Keyboard_accents.qml | 14 ++-- 3 files changed, 78 insertions(+), 79 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index 421bef52f..c6cc9464d 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -39,20 +39,20 @@ KeyPad { FlickCharKey { charlabel:["1", "q", "e", "r", ":"]; shiftedlabel:["1", "Q", "E", "R", ":"]; - leaves:["1", "q", "e", "r", ":"]; - shiftedleaves:["1", "Q", "E", "R", ":"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { charlabel:["2", "t", "y", "u", "g"]; shiftedlabel:["2", "T", "Y", "U", "G"]; - leaves:["2", "t", "y", "u", "g"]; - shiftedleaves:["2", "T", "Y", "U", "G"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { charlabel:["3", "i", "o", "m", ";"]; shiftedlabel:["3", "I", "O", "M", ";"] - leaves:["3", "i", "o", "m", ";"]; - shiftedleaves:["3", "I", "O", "M", ";"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } BackspaceKey { rightSide: true; width: panel.keyWidth;height:layout.height;} } @@ -62,11 +62,11 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] - shiftedlabel:charlabel + charlabel: ["#", "", "+", "~", "-"] + shiftedlabel: charlabel labelleft:true - leaves: ["#", "", "+", "~", "-"] - shiftedleaves:leaves + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { label: layout.state == "caps" ? "(F)" : "(f)"; @@ -84,27 +84,27 @@ KeyPad { annotation: layout.state == "caps" ? ";~" : ";~" charlabel:["4", "a", "w", "d", "s"]; shiftedlabel:["4", "A", "W", "D", "S"]; - leaves:["4", "a", "w", "d", "s"]; - shiftedleaves:["4", "A", "W", "D", "S"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel:["5", "b", "p", "f", "n"]; shiftedlabel:["5", "B", "P", "F", "N"]; - leaves:["5", "b", "p", "f", "n"]; - shiftedleaves:["5", "B", "P", "F", "N"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel:["6", "h", "k", "l", "j"]; shiftedlabel:["6", "H", "K", "L", "J"]; - leaves:["6", "h", "k", "l", "j"]; - shiftedleaves:["6", "H", "K", "L", "J"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["*", "€", "^", "", "$"] - shiftedlabel:charlabel + shiftedlabel: charlabel labelright:true - leaves: ["*", "€", "^", "", "$"] - shiftedleaves:leaves + leaves: charlabel + shiftedleaves: shiftedlabel } } @@ -115,27 +115,27 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel:charlabel - leaves: ["7", "]", "!", "[", "\\"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel:["8", "z", "x", "c", "v"] shiftedlabel:["8", "Z", "X", "C", "V"]; - leaves:["8", "z", "x", "c", "v"] - shiftedleaves:["8", "Z", "X", "C", "V"]; + leaves: charlabel + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel - leaves: ["9", ")", "?", "(", "/"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel: ["=", "₹", "£", "", "¥"] - shiftedlabel:charlabel - leaves: ["=", "₹", "£", "", "¥"] - shiftedleaves:leaves + leaves: charlabel + shiftedlabel: charlabel + shiftedleaves: shiftedlabel } } @@ -146,21 +146,21 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { charlabel: [",", ">", "&", "<", "_"] - shiftedlabel:charlabel + shiftedlabel: charlabel leaves: [",", ">", "&", "<", "_"] shiftedleaves:leaves } FlickCharKey { charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel:charlabel - leaves: ["0", "'", "`", "\"", "%"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel: [".", "}", "|", "{", "@"] - shiftedlabel:charlabel - leaves: [".", "}", "|", "{", "@"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 41bbca3e7..b88920f0f 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -21,7 +21,6 @@ import "../../keys/languages.js" as Languages KeyPad { anchors.fill:parent; content: c1 - symbols: "languages/Keyboard_accents.qml" Column { id: c1 property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 @@ -40,20 +39,20 @@ KeyPad { FlickCharKey { charlabel:["1", "q", "e", "r", ":"]; shiftedlabel:["1", "Q", "E", "R", ":"]; - leaves:["1", "q", "e", "r", ":"]; - shiftedleaves:["1", "Q", "E", "R", ":"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { charlabel:["2", "t", "y", "u", "g"]; shiftedlabel:["2", "T", "Y", "U", "G"]; - leaves:["2", "t", "y", "u", "g"]; - shiftedleaves:["2", "T", "Y", "U", "G"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { charlabel:["3", "i", "o", "m", ";"]; shiftedlabel:["3", "I", "O", "M", ";"] - leaves:["3", "i", "o", "m", ";"]; - shiftedleaves:["3", "I", "O", "M", ";"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} } @@ -63,36 +62,36 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] - shiftedlabel:charlabel + charlabel: ["#", "", "+", "~", "-"] + shiftedlabel: charlabel labelleft:true - leaves: ["#", "", "+", "~", "-"] - shiftedleaves:leaves + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel:["4", "a", "w", "d", "s"]; shiftedlabel:["4", "A", "W", "D", "S"]; - leaves:["4", "a", "w", "d", "s"]; - shiftedleaves:["4", "A", "W", "D", "S"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel:["5", "b", "p", "f", "n"]; shiftedlabel:["5", "B", "P", "F", "N"]; - leaves:["5", "b", "p", "f", "n"]; - shiftedleaves:["5", "B", "P", "F", "N"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel:["6", "h", "k", "l", "j"]; shiftedlabel:["6", "H", "K", "L", "J"]; - leaves:["6", "h", "k", "l", "j"]; - shiftedleaves:["6", "H", "K", "L", "J"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["*", "€", "^", "", "$"] - shiftedlabel:charlabel + shiftedlabel: charlabel labelright:true - leaves: ["*", "€", "^", "", "$"] - shiftedleaves:leaves + leaves: charlabel + shiftedleaves: shiftedlabel } } @@ -103,27 +102,27 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel:charlabel - leaves: ["7", "]", "!", "[", "\\"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel:["8", "z", "x", "c", "v"] shiftedlabel:["8", "Z", "X", "C", "V"]; - leaves:["8", "z", "x", "c", "v"] - shiftedleaves:["8", "Z", "X", "C", "V"]; + leaves: charlabel + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel - leaves: ["9", ")", "?", "(", "/"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { charlabel: ["=", "₹", "£", "", "¥"] - shiftedlabel:charlabel - leaves: ["=", "₹", "£", "", "¥"] - shiftedleaves:leaves + leaves: charlabel + shiftedlabel: charlabel + shiftedleaves: shiftedlabel } } @@ -134,15 +133,15 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { charlabel: [",", ">", "&", "<", "_"] - shiftedlabel:charlabel + shiftedlabel: charlabel leaves: [",", ">", "&", "<", "_"] shiftedleaves:leaves } FlickCharKey { charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel:charlabel - leaves: ["0", "'", "`", "\"", "%"] - shiftedleaves:leaves + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } StringKey { charlabel: [".", ".io", ".com", ".org",".net"] diff --git a/qml/languages/Keyboard_accents.qml b/qml/languages/Keyboard_accents.qml index 9ad5da5cc..18891eaa2 100644 --- a/qml/languages/Keyboard_accents.qml +++ b/qml/languages/Keyboard_accents.qml @@ -82,7 +82,7 @@ KeyPad { shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["‾", "™", "©", "", "®"]; + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["¢", "™", "©", "", "®"]; labelright:true leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : ["ʖ", "๑", " ͡", "", " ͜"]; @@ -97,7 +97,7 @@ KeyPad { CursorKey { leftSide:true; padding: 0 } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["–", "»", "—", "«", "…"] + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["–", "§", "¦", "ß", "⸘"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : ["ง", "ᕙ", "∀", "ᕗ", "⊸"]; shiftedleaves: shiftedlabel @@ -109,13 +109,13 @@ KeyPad { shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["¨", "♪", "¤", "☆", "✧"] + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["—", "ſ", "‽", "ı", "ð"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : ["ノ", "≧", "人", "≦", "ڡ"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["¢", "ſ", "ı", "", "ð"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["¤", "♪", "☆", "", "✧"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : ["•", "ẙ", "·", "", "∴"]; shiftedleaves: shiftedlabel @@ -129,19 +129,19 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : ["≠", "§", "ª", "ß", "°"] + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : ["„", "»", "‾", "«", "¿"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : ["つ", "’̀", "ツ", "‘́", "ヮ"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["¦", "“", "‰", "”", "„"] + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["≠", "“", "´", "”", "‰"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : ["∇", "╰", "「", "╯", "┐"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : ["´", "¡", "‽", "¿", "⸘"] + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : ["…", "ª", "¨", "°", "¡"] leaves: charlabel shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : ["∠", "☜", "゚", "☞", "」"]; shiftedleaves: shiftedlabel From 69981d372b54d5b30a3417dafef4fbcc5163e6c0 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Mon, 21 Dec 2020 15:58:19 -0300 Subject: [PATCH 38/57] clean trailing spaces --- qml/keys/CharKey.qml | 1 + qml/keys/SymojiKey.qml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qml/keys/CharKey.qml b/qml/keys/CharKey.qml index 31a8d4648..7d24cd224 100644 --- a/qml/keys/CharKey.qml +++ b/qml/keys/CharKey.qml @@ -133,6 +133,7 @@ Item { // row of keys all the way to the bottom of the keyboard, whilst // maintaining the same visual appearance. Item { + id:button anchors.top: parent.top height: parent.height width: parent.width diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index a5115b795..44a7054c4 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,8 +20,8 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey - charlabel: (panel.state == "CHARACTERS") ? ["", "", "¡ä", "", ""] : (state == "marks") ? ["", "", "¡ä", "", "a!"] : ["", "", "īø", "", "a!"] - leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "¡ä", "", "a!"] : ["", "", "īø", "", "a!"] + charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] + leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "happy.svg", ""] leavesFontSize: 30; From 87f8598af31ceb2198bb8c371392938a37412ef5 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Fri, 8 Jan 2021 13:30:20 -0300 Subject: [PATCH 39/57] fix syntax error and remove redundant code --- plugins/en@flick/qml/Keyboard_en@flick.qml | 15 +- .../en@flick/qml/Keyboard_en@flick_email.qml | 5 +- .../en@flick/qml/Keyboard_en@flick_url.qml | 172 ++++++++++-------- .../qml/Keyboard_en@flick_url_search.qml | 172 ++++++++++-------- qml/keys/CharKey.qml | 3 +- qml/keys/CursorKey.qml | 9 +- qml/keys/FlickCharKey.qml | 34 +--- 7 files changed, 216 insertions(+), 194 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index c6cc9464d..52fc3c0d8 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -54,7 +54,7 @@ KeyPad { leaves:charlabel; shiftedleaves:shiftedlabel; } - BackspaceKey { rightSide: true; width: panel.keyWidth;height:layout.height;} + CaseSwitchKey { id: layout; labelright:true} } Row { @@ -69,19 +69,6 @@ KeyPad { shiftedleaves: shiftedlabel } FlickCharKey { - label: layout.state == "caps" ? "(F)" : "(f)"; - leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; - annotation: layout.state == "caps" ? "5G" : "5g"; - } - FlickCharKey { - label: layout.state == "caps" ? "HKL" : "hkl"; - leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; - annotation: layout.state == "caps" ? "6J" : "6j"; - } - FlickCharKey { - label: layout.state == "caps" ? "&`" : "&`" - leaves: layout.state == "caps" ? [";", "&", "`", "", "~"] : [";", "&", "`", "", "~"] - annotation: layout.state == "caps" ? ";~" : ";~" charlabel:["4", "a", "w", "d", "s"]; shiftedlabel:["4", "A", "W", "D", "S"]; leaves: charlabel; diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index b88920f0f..81ef938cc 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -19,7 +19,8 @@ import keys 1.0 import "../../keys/languages.js" as Languages KeyPad { - anchors.fill:parent; + + anchors.fill: parent; content: c1 Column { id: c1 @@ -54,7 +55,7 @@ KeyPad { leaves:charlabel; shiftedleaves:shiftedlabel; } - BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + CaseSwitchKey { id: layout; labelright:true} } Row { diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index 29e50bee0..f06629aed 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -16,39 +16,45 @@ import QtQuick 2.4 import keys 1.0 -import "../../keys/languages.js" as Languages KeyPad { - - anchors.fill:parent; + + anchors.fill: parent; content: c1 - symbols: "languages/Keyboard_accents.qml" Column { id: c1 - anchors.fill:parent; - property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; - spacing: 0 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 + anchors.fill: parent; + spacing: 0 Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} - FlickCharKey { - charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - annotation: layout.state == "caps" ? "1:" : "1:"; + ActionKey{ + width:panel.keyWidth; + height:layout.height; + visHeight:height; + pressedColor: fullScreenItem.theme.actionKeyColor + } + FlickCharKey { + charlabel:["1", "q", "e", "r", ":"]; + shiftedlabel:["1", "Q", "E", "R", ":"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "TYU" : "tyu"; - leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; - annotation: layout.state == "caps" ? "2$" : "2$"; + charlabel:["2", "t", "y", "u", "g"]; + shiftedlabel:["2", "T", "Y", "U", "G"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "IOP" : "iop"; - leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; - annotation: layout.state == "caps" ? "3#" : "3#"; + charlabel:["3", "i", "o", "m", ";"]; + shiftedlabel:["3", "I", "O", "M", ";"] + leaves:charlabel; + shiftedleaves:shiftedlabel; } - BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + CaseSwitchKey { id: layout; labelright:true} } Row { @@ -56,29 +62,38 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "!", "&", "|"] - labelleft:true - leaves: ["=", "", "!", "&", "|"] + charlabel: ["#", "", "+", "~", "-"] + shiftedlabel: charlabel + labelleft:true + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { - label: layout.state == "caps" ? "AWD" : "awd"; - leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; - annotation: layout.state == "caps" ? "4S" : "4s"; + charlabel:["4", "a", "w", "d", "s"]; + shiftedlabel:["4", "A", "W", "D", "S"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "(F)" : "(f)"; - leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; - annotation: layout.state == "caps" ? "5G" : "5g"; + charlabel:["5", "b", "p", "f", "n"]; + shiftedlabel:["5", "B", "P", "F", "N"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "HKL" : "hkl"; - leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; - annotation: layout.state == "caps" ? "6J" : "6j"; + charlabel:["6", "h", "k", "l", "j"]; + shiftedlabel:["6", "H", "K", "L", "J"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "&`" : "&`" - leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" + charlabel: ["*", "€", "^", "", "$"] + shiftedlabel: charlabel + labelright:true + leaves: charlabel + shiftedleaves: shiftedlabel + iconDisabled: ["", "", "", "keyboard-caps-locked", ""] + iconAngles:["","","","90",""] } } @@ -86,63 +101,76 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - SymbolShiftKey { id: symShiftKey; } - FlickCharKey { - charlabel: ["7", "]", "*", "[", "\\"] - leaves: ["7", "]", "*", "[", "\\"] + CursorKey { leftSide:true; padding:0; } + FlickCharKey { + charlabel: ["7", "]", "!", "[", "\\"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { - label: layout.state == "caps" ? "[*]" : "[*]" - leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] - annotation: layout.state == "caps" ? "8V" : "8v" + charlabel:["8", "z", "x", "c", "v"] + shiftedlabel:["8", "Z", "X", "C", "V"]; + leaves: charlabel + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["9", ")", "?", "(", "/"] - leaves: ["9", ")", "?", "(", "/"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } - EmojiKey { - id: emojiKey; - - } - } + FlickCharKey { + charlabel: ["=", "₹", "£", "", "¥"] + leaves: charlabel + shiftedlabel: charlabel + shiftedleaves: shiftedlabel + iconDisabled: ["", "", "", "keyboard-caps-locked", ""] + iconAngles:["","","","90",""] + } + } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - LanguageKey { id: languageMenuButton; height:layout.height;} + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: [",", ">", "&", "<", "_"] + shiftedlabel: charlabel + leaves: [",", ">", "&", "<", "_"] + shiftedleaves:leaves + } FlickCharKey { - label: layout.state == "caps" ? "< - >" : "< - >" - leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; - annotation: layout.state == "caps" ? ",+" : ",+" - } - FlickCharKey { - label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" - leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; - annotation: layout.state == "caps" ? "0%" : "0%"; + charlabel: ["0", "'", "`", "\"", "%"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } StringKey { - charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; - leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; - unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + charlabel: [".", ".io", ".com", ".org",".net"] + shiftedlabel: [".", "}", "#", "{", "@"]; + leaves: [".", ".io", ".com", ".org",".net"] + shiftedleaves:[".", "}", "#", "{", "@"]; + unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} - } + } } // column - Row{ - anchors.horizontalCenter: parent.horizontalCenter; - anchors.left:parent.left - anchors.bottom:parent.bottom - spacing: 0 + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 - LayoutBar { - id: layoutBar; - width: parent.width; - height:layout.height-layout.height*0.5; - visHeight:height; - fontSize:fontSize; - } + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } } } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index fe822a0ab..f06629aed 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -16,39 +16,45 @@ import QtQuick 2.4 import keys 1.0 -import "../../keys/languages.js" as Languages KeyPad { - - anchors.fill:parent; + + anchors.fill: parent; content: c1 - symbols: "languages/Keyboard_accents.qml" Column { id: c1 - anchors.fill:parent; - property int keyHeight: panel.keyHeight-panel.keyHeight*0.1; - spacing: 0 + property int keyHeight: panel.keyHeight-panel.keyHeight*0.1 + anchors.fill: parent; + spacing: 0 Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} - FlickCharKey { - charlabel: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - leaves: layout.state == "caps" ? ["1", "Q", "E", "R", ":"] : ["1", "q", "e", "r", ":"]; - annotation: layout.state == "caps" ? "1:" : "1:"; + ActionKey{ + width:panel.keyWidth; + height:layout.height; + visHeight:height; + pressedColor: fullScreenItem.theme.actionKeyColor + } + FlickCharKey { + charlabel:["1", "q", "e", "r", ":"]; + shiftedlabel:["1", "Q", "E", "R", ":"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "TYU" : "tyu"; - leaves: layout.state == "caps" ? ["2", "T", "Y", "U", "$"] : ["2", "t", "y", "u", "$"]; - annotation: layout.state == "caps" ? "2$" : "2$"; + charlabel:["2", "t", "y", "u", "g"]; + shiftedlabel:["2", "T", "Y", "U", "G"]; + leaves:charlabel; + shiftedleaves:shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "IOP" : "iop"; - leaves: layout.state == "caps" ? ["3", "I", "O", "P", "#"] : ["3", "i", "o", "p", "#"]; - annotation: layout.state == "caps" ? "3#" : "3#"; + charlabel:["3", "i", "o", "m", ";"]; + shiftedlabel:["3", "I", "O", "M", ";"] + leaves:charlabel; + shiftedleaves:shiftedlabel; } - BackspaceKey { rightSide: true; width: panel.keyWidth; height:layout.height;} + CaseSwitchKey { id: layout; labelright:true} } Row { @@ -56,29 +62,38 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["=", "", "!", "&", "|"] - labelleft:true - leaves: ["=", "", "!", "&", "|"] + charlabel: ["#", "", "+", "~", "-"] + shiftedlabel: charlabel + labelleft:true + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { - label: layout.state == "caps" ? "AWD" : "awd"; - leaves: layout.state == "caps" ? ["4", "A", "W", "D", "S"] : ["4", "a", "w", "d", "s"]; - annotation: layout.state == "caps" ? "4S" : "4s"; + charlabel:["4", "a", "w", "d", "s"]; + shiftedlabel:["4", "A", "W", "D", "S"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "(F)" : "(f)"; - leaves: layout.state == "caps" ? ["5", "(", "F", ")", "G"] : ["5", "(", "f", ")", "g"]; - annotation: layout.state == "caps" ? "5G" : "5g"; + charlabel:["5", "b", "p", "f", "n"]; + shiftedlabel:["5", "B", "P", "F", "N"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "HKL" : "hkl"; - leaves: layout.state == "caps" ? ["6", "H", "K", "L", "J"] : ["6", "h", "k", "l", "j"]; - annotation: layout.state == "caps" ? "6J" : "6j"; + charlabel:["6", "h", "k", "l", "j"]; + shiftedlabel:["6", "H", "K", "L", "J"]; + leaves: charlabel; + shiftedleaves: shiftedlabel; } FlickCharKey { - label: layout.state == "caps" ? "&`" : "&`" - leaves: layout.state == "caps" ? ["@", "&", "`", "", "~"] : ["@", "&", "`", "", "~"] - annotation: layout.state == "caps" ? "@~" : "@~" + charlabel: ["*", "€", "^", "", "$"] + shiftedlabel: charlabel + labelright:true + leaves: charlabel + shiftedleaves: shiftedlabel + iconDisabled: ["", "", "", "keyboard-caps-locked", ""] + iconAngles:["","","","90",""] } } @@ -86,63 +101,76 @@ KeyPad { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - SymbolShiftKey { id: symShiftKey; } - FlickCharKey { - charlabel: ["7", "]", "*", "[", "\\"] - leaves: ["7", "]", "*", "[", "\\"] + CursorKey { leftSide:true; padding:0; } + FlickCharKey { + charlabel: ["7", "]", "!", "[", "\\"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } FlickCharKey { - label: layout.state == "caps" ? "[*]" : "[*]" - leaves: layout.state == "caps" ? ["8", "[", "*", "]", "V"] : ["8", "[", "*", "]", "v"] - annotation: layout.state == "caps" ? "8V" : "8v" + charlabel:["8", "z", "x", "c", "v"] + shiftedlabel:["8", "Z", "X", "C", "V"]; + leaves: charlabel + shiftedleaves: shiftedlabel; } FlickCharKey { charlabel: ["9", ")", "?", "(", "/"] - leaves: ["9", ")", "?", "(", "/"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } - EmojiKey { - id: emojiKey; - - } - } + FlickCharKey { + charlabel: ["=", "₹", "£", "", "¥"] + leaves: charlabel + shiftedlabel: charlabel + shiftedleaves: shiftedlabel + iconDisabled: ["", "", "", "keyboard-caps-locked", ""] + iconAngles:["","","","90",""] + } + } Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 0 - LanguageKey { id: languageMenuButton; height:layout.height;} + SymojiKey { id: symojiKey;} + FlickCharKey { + charlabel: [",", ">", "&", "<", "_"] + shiftedlabel: charlabel + leaves: [",", ">", "&", "<", "_"] + shiftedleaves:leaves + } FlickCharKey { - label: layout.state == "caps" ? "< - >" : "< - >" - leaves: layout.state == "caps" ? [",", "<", "-", ">", "+"]: [",", "<", "-", ">", "+"]; - annotation: layout.state == "caps" ? ",+" : ",+" - } - FlickCharKey { - label: layout.state == "caps" ? "' ^ \"" : "' ^ \"" - leaves: layout.state == "caps" ? ["0", "'", "^", "\"", "%"] : ["0", "'", "^", "\"", "%"]; - annotation: layout.state == "caps" ? "0%" : "0%"; + charlabel: ["0", "'", "`", "\"", "%"] + shiftedlabel: charlabel + leaves: charlabel + shiftedleaves: shiftedlabel } StringKey { - charlabel: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"] : [".", "}", "#", "{", "@"]; - leaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]:[".", "}", "#", "{", "@"]; - unstyledLeaves: layout.state == "caps" ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + charlabel: [".", ".io", ".com", ".org",".net"] + shiftedlabel: [".", "}", "#", "{", "@"]; + leaves: [".", ".io", ".com", ".org",".net"] + shiftedleaves:[".", "}", "#", "{", "@"]; + unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} - } + } } // column - Row{ - anchors.horizontalCenter: parent.horizontalCenter; - anchors.left:parent.left - anchors.bottom:parent.bottom - spacing: 0 + Row{ + anchors.horizontalCenter: parent.horizontalCenter; + anchors.left:parent.left + anchors.bottom:parent.bottom + spacing: 0 - LayoutBar { - id: layoutBar; - width: parent.width; - height:layout.height-layout.height*0.5; - visHeight:height; - fontSize:fontSize; - } + LayoutBar { + id: layoutBar; + width: parent.width; + height:layout.height-layout.height*0.5; + visHeight:height; + fontSize:fontSize; + } } } diff --git a/qml/keys/CharKey.qml b/qml/keys/CharKey.qml index 7d24cd224..75a2848ab 100644 --- a/qml/keys/CharKey.qml +++ b/qml/keys/CharKey.qml @@ -25,6 +25,7 @@ Item { id: key property int padding: 0 + property int visHeight: panel.keyHeight width: leftSide || rightSide ? panel.keyWidth * 2 : panel.keyWidth height: panel.keyHeight @@ -135,7 +136,7 @@ Item { Item { id:button anchors.top: parent.top - height: parent.height + height: visHeight width: parent.width Rectangle { diff --git a/qml/keys/CursorKey.qml b/qml/keys/CursorKey.qml index 18b518df4..84ccc54b9 100644 --- a/qml/keys/CursorKey.qml +++ b/qml/keys/CursorKey.qml @@ -23,6 +23,7 @@ ActionKey { shifted:label; action: leftSide ? "left" : "right"; height:layout.height; + visHeight:layout.height; property string preedit: maliit_input_method.preedit property int cursorPosition: maliit_input_method.cursorPosition property bool isPreedit: preedit != "" @@ -30,13 +31,13 @@ ActionKey { overridePressArea: true; onReleased: { - if (isPreedit) { + if (isPreedit && !fullScreenItem.cursorSwipe) { if (action == "left" && cursorPosition > 0) { maliit_input_method.cursorPosition-- } else if (action == "right" && cursorPosition < preedit.length) { maliit_input_method.cursorPosition++ } - } else { + } else if (!fullScreenItem.cursorSwipe) { event_handler.onKeyReleased("", action); } } @@ -53,6 +54,8 @@ ActionKey { } onPressAndHold: { - fullScreenItem.cursorSwipe=true + fullScreenItem.cursorSwipe=true; + if(rightSide) + cursorSwipeArea.selectionMode=true; } } diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index e237c476c..1a7a14787 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -18,6 +18,7 @@ import QtQuick 2.4 import QtMultimedia 5.0 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 +import QtQuick.Layouts 1.1 import "key_constants.js" as UI @@ -25,10 +26,9 @@ Item { id: key property int padding: 0 - width: leftSide || rightSide ? panel.keyWidth * 2 : panel.keyWidth height: c1.keyHeight - + /* to be set in keyboard layouts */ property string label: ""; property var leaves: ["", "", "", "", ""]; @@ -40,6 +40,8 @@ Item { property string action property bool noMagnifier: true + property bool labelright:false + property bool labelleft:false property bool skipAutoCaps: false property bool switchBackFromSymbols: false @@ -239,7 +241,6 @@ Item { visible: !iconImageLeft.visible && !panel.hideKeyLabels } } - } ColumnLayout { id: topColumn @@ -271,17 +272,6 @@ Item { textFormat: Text.StyledText visible: !iconImageUp.visible && !panel.hideKeyLabels } - Text { - id: keyLabel - text: (panel.hideKeyLabels)?"":label - anchors.horizontalCenter: parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.fontColor - textFormat: Text.StyledText - visible: label!="" - } } } @@ -357,22 +347,6 @@ Item { } } } - Column { - spacing: units.gu( UI.annotationMargins ) - anchors.left: parent.left - Text { - id: tapLabel - text: (panel.hideKeyLabels)?"":charlabel[0] - anchors.horizontalCenter: parent.horizontalCenter - font.family: UI.fontFamily - font.pixelSize: fontSize - font.weight: Font.Light - color: fullScreenItem.theme.selectionColor - textFormat: Text.StyledText - } - - } - } FlickPop { From 15471f1c552503bae6376c36982fe3fa388a67ae Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Fri, 12 Mar 2021 15:52:38 -0300 Subject: [PATCH 40/57] swap the @ and ~ keys --- plugins/en@flick/qml/Keyboard_en@flick.qml | 4 ++-- plugins/en@flick/qml/Keyboard_en@flick_email.qml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index 52fc3c0d8..ed080e832 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -62,7 +62,7 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] + charlabel: ["#", "", "+", "@", "-"] shiftedlabel: charlabel labelleft:true leaves: charlabel @@ -144,7 +144,7 @@ KeyPad { shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: [".", "}", "|", "{", "@"] + charlabel: [".", "}", "|", "{", "~"] shiftedlabel: charlabel leaves: charlabel shiftedleaves: shiftedlabel diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 81ef938cc..8ac14e689 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -63,7 +63,7 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] + charlabel: ["#", "", "+", "@", "-"] shiftedlabel: charlabel labelleft:true leaves: charlabel @@ -146,10 +146,10 @@ KeyPad { } StringKey { charlabel: [".", ".io", ".com", ".org",".net"] - shiftedlabel: [".", "}", "#", "{", "@"]; + shiftedlabel: [".", "}", "#", "{", "~"]; leaves: [".", ".io", ".com", ".org",".net"] - shiftedleaves:[".", "}", "#", "{", "@"]; - unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + shiftedleaves:[".", "}", "#", "{", "~"]; + unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "~"]; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } From 84001bbd08ad0f51db937e9fd8e2fe79d1a015a0 Mon Sep 17 00:00:00 2001 From: Merkhad Luigton Date: Sat, 27 Mar 2021 05:24:40 +0000 Subject: [PATCH 41/57] fix the bottomleft column to the button left --- qml/keys/FlickCharKey.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 1a7a14787..a3550d6c3 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -278,6 +278,7 @@ Item { RowLayout { id: bottomRightCol anchors.right: parent.right + anchors.bottom: parent.bottom spacing: 0 ColumnLayout { From 7e75663996b3b7875abb2714db178afb698fb61f Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 27 Mar 2021 09:13:43 -0300 Subject: [PATCH 42/57] replace anchors with layout.alignment where applicable --- qml/keys/FlickCharKey.qml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index a3550d6c3..d096ab2ff 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -189,7 +189,7 @@ Item { id: iconImage source: iconCommon[0] color: fullScreenItem.theme.selectionColor - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter visible: (iconCommon[0] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize @@ -199,7 +199,7 @@ Item { Text { id: tapLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[0]:shiftedlabel[0] - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily font.pixelSize: fontSize @@ -221,7 +221,7 @@ Item { id: iconImageLeft source: iconCommon[1] color: key.colorNormal - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter visible: (iconCommon[1] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize @@ -231,7 +231,7 @@ Item { Text { id: middleLeftLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[1]:shiftedlabel[1] - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily font.pixelSize:fontSize @@ -252,7 +252,7 @@ Item { id: iconImageUp source: iconCommon[2] color: key.colorNormal - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter visible: (iconCommon[2] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize @@ -263,7 +263,7 @@ Item { Text { id: topCenterLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[2]:shiftedlabel[2]; - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily font.pixelSize:fontSize @@ -291,9 +291,7 @@ Item { id: iconImageDown source: iconCommon[4] color: key.colorNormal - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) + Layout.alignment: Qt.AlignHCenter visible: (iconCommon[4] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize @@ -303,10 +301,8 @@ Item { Text { id: bottomCenterLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[4]:shiftedlabel[4] - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: units.gu(0.25) font.family: UI.fontFamily font.pixelSize:fontSize font.weight: Font.Light @@ -327,7 +323,7 @@ Item { id: iconImageRight source: iconCommon[3] color: key.colorNormal - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter visible: (iconCommon[3] != "" && !panel.hideKeyLabels) width: buttonRect.iconSize height: buttonRect.iconSize @@ -337,7 +333,7 @@ Item { Text { id: middleRightLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[3]:shiftedlabel[3] - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter font.family: UI.fontFamily font.pixelSize:fontSize From babe6541edab82e94f341997a42b66d194637302 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 27 Mar 2021 12:06:43 -0300 Subject: [PATCH 43/57] increasing sizing of leaves symojikey --- qml/keys/SymojiKey.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 44a7054c4..56ac343d7 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -24,7 +24,7 @@ FlickActionKey { leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "happy.svg", ""] - leavesFontSize: 30; + leavesFontSize: 60; shiftedlabel: charlabel shiftedleaves: leaves width: panel.keyWidth; From 2f4e3b3a27ce82a706d8fc1a2720b5c8d2754986 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Mon, 21 Dec 2020 15:57:44 -0300 Subject: [PATCH 44/57] add disabled icons in the keys --- qml/keys/FlickCharKey.qml | 37 ++++++++++++++++++++++++++++++++++--- qml/keys/SymojiKey.qml | 2 ++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index d096ab2ff..94c30e3c1 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -62,6 +62,7 @@ Item { /* icons */ property var iconNormal: ["", "", "", "", ""]; property var iconNormalSource: ["", "", "", "", ""]; + property var iconDisabled: ["", "", "", "", ""]; property var iconCommon: [ iconNormalSource[0] !== "" ? iconNormalSource[0] : iconNormal[0] ? "image://theme/%1".arg(iconNormal[0]) : "", @@ -228,6 +229,16 @@ Item { transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[1]} } + Icon { + id: iconLeft + source: iconDisabled[1] != "" ? "image://theme/%1".arg(iconDisabled[1]):"" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonRect.iconSize + height: buttonRect.iconSize + visible: (middleLeftLabel.text == "" && !iconImageLeft.visible && !panel.hideKeyLabels) + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[1]} + } + Text { id: middleLeftLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[1]:shiftedlabel[1] @@ -238,7 +249,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageLeft.visible && !panel.hideKeyLabels + visible: !iconLeft.visible && !iconImageLeft.visible && !panel.hideKeyLabels } } @@ -298,6 +309,16 @@ Item { transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[4]} } + Icon { + id: iconDown + source: iconDisabled[4] != "" ? "image://theme/%1".arg(iconDisabled[4]):"" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonRect.iconSize + height: buttonRect.iconSize + visible: (bottomCenterLabel.text == "" && !iconImageDown.visible && !panel.hideKeyLabels) + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[4]} + } + Text { id: bottomCenterLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[4]:shiftedlabel[4] @@ -308,7 +329,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageDown.visible && !panel.hideKeyLabels + visible: !iconDown.visible && !iconImageDown.visible && !panel.hideKeyLabels } } @@ -330,6 +351,16 @@ Item { transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[3]} } + Icon { + id: iconRight + source: iconDisabled[3] != "" ? "image://theme/%1".arg(iconDisabled[3]):"" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonRect.iconSize + height: buttonRect.iconSize + visible: (middleRightLabel.text == "" && !iconImageRight.visible && !panel.hideKeyLabels) + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[3]} + } + Text { id: middleRightLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[3]:shiftedlabel[3] @@ -340,7 +371,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageRight.visible && !panel.hideKeyLabels + visible: !iconImageRight.visible && !iconRight.visible && !panel.hideKeyLabels } } } diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 56ac343d7..e29e9105e 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -24,6 +24,8 @@ FlickActionKey { leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "happy.svg", ""] + iconAngles:["","270","","","180"] + iconDisabled: ["", "keyboard-caps-locked", "", "", "keyboard-caps-locked"] leavesFontSize: 60; shiftedlabel: charlabel shiftedleaves: leaves From df20d4beae47e878459f057d5e6f3536ab59d62d Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 27 Mar 2021 14:58:57 -0300 Subject: [PATCH 45/57] refactor Symoji key --- qml/keys/SymojiKey.qml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index e29e9105e..eb204b14e 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,12 +20,12 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey - charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] - leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", ""] : (state == "marks") ? ["", "", "ä‽", "", "a!"] : ["", "", "īø", "", "a!"] + charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] + leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "happy.svg", ""] - iconAngles:["","270","","","180"] - iconDisabled: ["", "keyboard-caps-locked", "", "", "keyboard-caps-locked"] + iconAngles:["","","","","180"] + iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] leavesFontSize: 60; shiftedlabel: charlabel shiftedleaves: leaves @@ -74,13 +74,17 @@ FlickActionKey { } } else if (index == 2) { if (panel.state == "ACCENTS") - state = state == "marks" ? "signs" : "marks"; + state = "marks"; else panel.state = "ACCENTS"; } else if (index == 3) { panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; } else if (index == 4) { - panel.state = "CHARACTERS"; + if(state == "marks") + panel.state = "CHARACTERS"; + else{ + state = "signs"; + } } } onPressed: { From 4dec1153d279f25c79d4b36d083df2a004f85760 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 27 Mar 2021 16:14:32 -0300 Subject: [PATCH 46/57] fix icon for emoji action --- qml/keys/SymojiKey.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index eb204b14e..4a3f52c88 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -23,7 +23,7 @@ FlickActionKey { charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] - iconNormalSource: ["", "", "", "happy.svg", ""] + iconNormalSource: ["", "", "", "../images/happy.svg", ""] iconAngles:["","","","","180"] iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] leavesFontSize: 60; From d345b5e2e5d25752aaccfec6c16136a13882960a Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sat, 27 Mar 2021 16:27:22 -0300 Subject: [PATCH 47/57] switch to the "signs" accents layout (only) on flick up --- qml/keys/SymojiKey.qml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 4a3f52c88..cd7983b05 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,8 +20,8 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey - charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] - leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "", "", "a!"] : ["", "", "a!", "", ""] + charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "a!", "", ""] : ["", "", "", "", "a!"] + leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "a!", "", ""] : ["", "", "", "", "a!"] iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "../images/happy.svg", ""] iconAngles:["","","","","180"] @@ -73,18 +73,11 @@ FlickActionKey { canvas.languageMenuShown = true; } } else if (index == 2) { - if (panel.state == "ACCENTS") - state = "marks"; - else - panel.state = "ACCENTS"; + panel.state = (panel.state == "ACCENTS" && state =="marks") ? "CHARACTERS" : "ACCENTS"; } else if (index == 3) { panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; } else if (index == 4) { - if(state == "marks") - panel.state = "CHARACTERS"; - else{ - state = "signs"; - } + if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; } } onPressed: { From 6eb914a66b34b1e2b203d438c4ddaf1a9e5375e9 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 28 Mar 2021 19:14:49 -0300 Subject: [PATCH 48/57] add disabled icon for flick up --- qml/keys/FlickCharKey.qml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/qml/keys/FlickCharKey.qml b/qml/keys/FlickCharKey.qml index 94c30e3c1..52bbd4da6 100644 --- a/qml/keys/FlickCharKey.qml +++ b/qml/keys/FlickCharKey.qml @@ -232,7 +232,7 @@ Item { Icon { id: iconLeft source: iconDisabled[1] != "" ? "image://theme/%1".arg(iconDisabled[1]):"" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter width: buttonRect.iconSize height: buttonRect.iconSize visible: (middleLeftLabel.text == "" && !iconImageLeft.visible && !panel.hideKeyLabels) @@ -271,6 +271,15 @@ Item { transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[2]} } + Icon { + id: iconUp + source: iconDisabled[2] != "" ? "image://theme/%1".arg(iconDisabled[2]):"" + Layout.alignment: Qt.AlignHCenter + width: buttonRect.iconSize + height: buttonRect.iconSize + visible: (topCenterLabel.text == "" && !iconImageUp.visible && !panel.hideKeyLabels) + transform: Rotation { origin.x:buttonRect.iconSize/2; origin.y:buttonRect.iconSize/2; angle:iconAngles[2]} + } Text { id: topCenterLabel text: (panel.activeKeypadState === "NORMAL")?charlabel[2]:shiftedlabel[2]; @@ -281,7 +290,7 @@ Item { font.weight: Font.Light color: fullScreenItem.theme.fontColor textFormat: Text.StyledText - visible: !iconImageUp.visible && !panel.hideKeyLabels + visible: !iconImageUp.visible && !iconUp.visible && !panel.hideKeyLabels } } } @@ -312,7 +321,7 @@ Item { Icon { id: iconDown source: iconDisabled[4] != "" ? "image://theme/%1".arg(iconDisabled[4]):"" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter width: buttonRect.iconSize height: buttonRect.iconSize visible: (bottomCenterLabel.text == "" && !iconImageDown.visible && !panel.hideKeyLabels) @@ -354,7 +363,7 @@ Item { Icon { id: iconRight source: iconDisabled[3] != "" ? "image://theme/%1".arg(iconDisabled[3]):"" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter width: buttonRect.iconSize height: buttonRect.iconSize visible: (middleRightLabel.text == "" && !iconImageRight.visible && !panel.hideKeyLabels) From 6337602e4f1ece5e84f78f9a4a1fbf63cf7da9af Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Sun, 28 Mar 2021 23:27:39 -0300 Subject: [PATCH 49/57] fix symoji key sizing --- qml/keys/SymojiKey.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index cd7983b05..c85a9fa3d 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -26,7 +26,6 @@ FlickActionKey { iconNormalSource: ["", "", "", "../images/happy.svg", ""] iconAngles:["","","","","180"] iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] - leavesFontSize: 60; shiftedlabel: charlabel shiftedleaves: leaves width: panel.keyWidth; From d991a1e5d786cc81dd032a1e2fe80364996486d6 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 31 Mar 2021 09:58:03 -0300 Subject: [PATCH 50/57] fix emoji switch --- qml/keys/SymojiKey.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index c85a9fa3d..e1d5ee310 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -74,7 +74,8 @@ FlickActionKey { } else if (index == 2) { panel.state = (panel.state == "ACCENTS" && state =="marks") ? "CHARACTERS" : "ACCENTS"; } else if (index == 3) { - panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; + //panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; + maliit_input_method.activeLanguage = "emoji"; } else if (index == 4) { if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; } From 278324e2e92dea46fae817e2bf08edda5f1fe2ea Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 31 Mar 2021 13:05:59 -0300 Subject: [PATCH 51/57] switch to the "marks" layout on flick down on the symojikey match the keys of the different layouts where applicable --- plugins/en@flick/qml/Keyboard_en@flick.qml | 64 ++++++++-------- .../en@flick/qml/Keyboard_en@flick_email.qml | 71 +++++++++--------- .../en@flick/qml/Keyboard_en@flick_url.qml | 74 +++++++++---------- .../qml/Keyboard_en@flick_url_search.qml | 74 +++++++++---------- qml/keys/SymojiKey.qml | 13 ++-- qml/languages/Keyboard_accents.qml | 60 +++++++-------- 6 files changed, 174 insertions(+), 182 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index ed080e832..544dbe066 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -37,20 +37,20 @@ KeyPad { pressedColor: fullScreenItem.theme.actionKeyColor } FlickCharKey { - charlabel:["1", "q", "e", "r", ":"]; - shiftedlabel:["1", "Q", "E", "R", ":"]; + charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]:["1", "q", "e", "r", ":"]; + shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] :["1", "Q", "E", "R", ":"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["2", "t", "y", "u", "g"]; - shiftedlabel:["2", "T", "Y", "U", "G"]; + charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] :["2", "t", "y", "u", "g"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] :["2", "T", "Y", "U", "G"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["3", "i", "o", "m", ";"]; - shiftedlabel:["3", "I", "O", "M", ";"] + charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] :["3", "i", "o", "m", ";"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] :["3", "I", "O", "M", ";"] leaves:charlabel; shiftedleaves:shiftedlabel; } @@ -62,33 +62,33 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "@", "-"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["#", "", "+", "@", "-"] + shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : charlabel labelleft:true leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["4", "a", "w", "d", "s"]; - shiftedlabel:["4", "A", "W", "D", "S"]; + charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] :["4", "a", "w", "d", "s"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] :["4", "A", "W", "D", "S"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["5", "b", "p", "f", "n"]; - shiftedlabel:["5", "B", "P", "F", "N"]; + charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] :["5", "b", "p", "f", "n"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] :["5", "B", "P", "F", "N"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["6", "h", "k", "l", "j"]; - shiftedlabel:["6", "H", "K", "L", "J"]; + charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]:["6", "h", "k", "l", "j"]; + shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] :["6", "H", "K", "L", "J"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["*", "€", "^", "", "$"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["*", "€", "^", "", "$"] + shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : charlabel labelright:true leaves: charlabel shiftedleaves: shiftedlabel @@ -101,27 +101,27 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { - charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["7", "]", "!", "[", "\\"] + shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["8", "z", "x", "c", "v"] - shiftedlabel:["8", "Z", "X", "C", "V"]; + charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] :["8", "z", "x", "c", "v"] + shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] :["8", "Z", "X", "C", "V"]; leaves: charlabel shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["9", ")", "?", "(", "/"] + shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["=", "₹", "£", "", "¥"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["=", "₹", "£", "", "¥"] leaves: charlabel - shiftedlabel: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : charlabel shiftedleaves: shiftedlabel } } @@ -132,20 +132,20 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "&", "<", "_"] - shiftedlabel: charlabel - leaves: [",", ">", "&", "<", "_"] - shiftedleaves:leaves + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] + shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel + leaves: charlabel + shiftedleaves:shiftedlabel } FlickCharKey { - charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] + shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: [".", "}", "|", "{", "~"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : [".", "}", "|", "{", "~"] + shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 8ac14e689..6117def18 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -16,7 +16,6 @@ import QtQuick 2.4 import keys 1.0 -import "../../keys/languages.js" as Languages KeyPad { @@ -38,20 +37,20 @@ KeyPad { pressedColor: fullScreenItem.theme.actionKeyColor } FlickCharKey { - charlabel:["1", "q", "e", "r", ":"]; - shiftedlabel:["1", "Q", "E", "R", ":"]; + charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]:["1", "q", "e", "r", ":"]; + shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] :["1", "Q", "E", "R", ":"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["2", "t", "y", "u", "g"]; - shiftedlabel:["2", "T", "Y", "U", "G"]; + charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] :["2", "t", "y", "u", "g"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] :["2", "T", "Y", "U", "G"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["3", "i", "o", "m", ";"]; - shiftedlabel:["3", "I", "O", "M", ";"] + charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] :["3", "i", "o", "m", ";"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] :["3", "I", "O", "M", ";"] leaves:charlabel; shiftedleaves:shiftedlabel; } @@ -63,33 +62,33 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "@", "-"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["#", "", "+", "@", "-"] + shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : charlabel labelleft:true leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["4", "a", "w", "d", "s"]; - shiftedlabel:["4", "A", "W", "D", "S"]; + charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] :["4", "a", "w", "d", "s"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] :["4", "A", "W", "D", "S"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["5", "b", "p", "f", "n"]; - shiftedlabel:["5", "B", "P", "F", "N"]; + charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] :["5", "b", "p", "f", "n"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] :["5", "B", "P", "F", "N"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["6", "h", "k", "l", "j"]; - shiftedlabel:["6", "H", "K", "L", "J"]; + charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]:["6", "h", "k", "l", "j"]; + shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] :["6", "H", "K", "L", "J"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["*", "€", "^", "", "$"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["*", "€", "^", "", "$"] + shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : charlabel labelright:true leaves: charlabel shiftedleaves: shiftedlabel @@ -102,27 +101,27 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { - charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["7", "]", "!", "[", "\\"] + shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["8", "z", "x", "c", "v"] - shiftedlabel:["8", "Z", "X", "C", "V"]; + charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] :["8", "z", "x", "c", "v"] + shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] :["8", "Z", "X", "C", "V"]; leaves: charlabel shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["9", ")", "?", "(", "/"] + shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["=", "₹", "£", "", "¥"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["=", "₹", "£", "", "¥"] leaves: charlabel - shiftedlabel: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : charlabel shiftedleaves: shiftedlabel } } @@ -133,23 +132,23 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "&", "<", "_"] - shiftedlabel: charlabel - leaves: [",", ">", "&", "<", "_"] - shiftedleaves:leaves + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] + shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel + leaves: charlabel + shiftedleaves:shiftedlabel } FlickCharKey { - charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] + shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"] - shiftedlabel: [".", "}", "#", "{", "~"]; - leaves: [".", ".io", ".com", ".org",".net"] - shiftedleaves:[".", "}", "#", "{", "~"]; - unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "~"]; + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : [".", ".io", ".com", ".org",".net"] + shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : [".", "}", "#", "{", "~"]; + leaves: symojiKey.state == "marks" ? charlabel : [".", ".io", ".com", ".org",".net"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : [".", "}", "#", "{", "~"]; + unstyledLeaves: symojiKey.state == "marks" ? shiftedlabel : (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: shiftedlabel; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index f06629aed..6117def18 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -37,20 +37,20 @@ KeyPad { pressedColor: fullScreenItem.theme.actionKeyColor } FlickCharKey { - charlabel:["1", "q", "e", "r", ":"]; - shiftedlabel:["1", "Q", "E", "R", ":"]; + charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]:["1", "q", "e", "r", ":"]; + shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] :["1", "Q", "E", "R", ":"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["2", "t", "y", "u", "g"]; - shiftedlabel:["2", "T", "Y", "U", "G"]; + charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] :["2", "t", "y", "u", "g"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] :["2", "T", "Y", "U", "G"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["3", "i", "o", "m", ";"]; - shiftedlabel:["3", "I", "O", "M", ";"] + charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] :["3", "i", "o", "m", ";"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] :["3", "I", "O", "M", ";"] leaves:charlabel; shiftedleaves:shiftedlabel; } @@ -62,38 +62,36 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["#", "", "+", "@", "-"] + shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : charlabel labelleft:true leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["4", "a", "w", "d", "s"]; - shiftedlabel:["4", "A", "W", "D", "S"]; + charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] :["4", "a", "w", "d", "s"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] :["4", "A", "W", "D", "S"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["5", "b", "p", "f", "n"]; - shiftedlabel:["5", "B", "P", "F", "N"]; + charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] :["5", "b", "p", "f", "n"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] :["5", "B", "P", "F", "N"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["6", "h", "k", "l", "j"]; - shiftedlabel:["6", "H", "K", "L", "J"]; + charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]:["6", "h", "k", "l", "j"]; + shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] :["6", "H", "K", "L", "J"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["*", "€", "^", "", "$"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["*", "€", "^", "", "$"] + shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : charlabel labelright:true leaves: charlabel shiftedleaves: shiftedlabel - iconDisabled: ["", "", "", "keyboard-caps-locked", ""] - iconAngles:["","","","90",""] } } @@ -103,30 +101,28 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { - charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["7", "]", "!", "[", "\\"] + shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["8", "z", "x", "c", "v"] - shiftedlabel:["8", "Z", "X", "C", "V"]; + charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] :["8", "z", "x", "c", "v"] + shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] :["8", "Z", "X", "C", "V"]; leaves: charlabel shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["9", ")", "?", "(", "/"] + shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["=", "₹", "£", "", "¥"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["=", "₹", "£", "", "¥"] leaves: charlabel - shiftedlabel: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : charlabel shiftedleaves: shiftedlabel - iconDisabled: ["", "", "", "keyboard-caps-locked", ""] - iconAngles:["","","","90",""] } } @@ -136,23 +132,23 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "&", "<", "_"] - shiftedlabel: charlabel - leaves: [",", ">", "&", "<", "_"] - shiftedleaves:leaves + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] + shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel + leaves: charlabel + shiftedleaves:shiftedlabel } FlickCharKey { - charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] + shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"] - shiftedlabel: [".", "}", "#", "{", "@"]; - leaves: [".", ".io", ".com", ".org",".net"] - shiftedleaves:[".", "}", "#", "{", "@"]; - unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : [".", ".io", ".com", ".org",".net"] + shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : [".", "}", "#", "{", "~"]; + leaves: symojiKey.state == "marks" ? charlabel : [".", ".io", ".com", ".org",".net"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : [".", "}", "#", "{", "~"]; + unstyledLeaves: symojiKey.state == "marks" ? shiftedlabel : (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: shiftedlabel; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index f06629aed..6117def18 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -37,20 +37,20 @@ KeyPad { pressedColor: fullScreenItem.theme.actionKeyColor } FlickCharKey { - charlabel:["1", "q", "e", "r", ":"]; - shiftedlabel:["1", "Q", "E", "R", ":"]; + charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]:["1", "q", "e", "r", ":"]; + shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] :["1", "Q", "E", "R", ":"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["2", "t", "y", "u", "g"]; - shiftedlabel:["2", "T", "Y", "U", "G"]; + charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] :["2", "t", "y", "u", "g"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] :["2", "T", "Y", "U", "G"]; leaves:charlabel; shiftedleaves:shiftedlabel; } FlickCharKey { - charlabel:["3", "i", "o", "m", ";"]; - shiftedlabel:["3", "I", "O", "M", ";"] + charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] :["3", "i", "o", "m", ";"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] :["3", "I", "O", "M", ";"] leaves:charlabel; shiftedleaves:shiftedlabel; } @@ -62,38 +62,36 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: ["#", "", "+", "~", "-"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["#", "", "+", "@", "-"] + shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : charlabel labelleft:true leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["4", "a", "w", "d", "s"]; - shiftedlabel:["4", "A", "W", "D", "S"]; + charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] :["4", "a", "w", "d", "s"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] :["4", "A", "W", "D", "S"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["5", "b", "p", "f", "n"]; - shiftedlabel:["5", "B", "P", "F", "N"]; + charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] :["5", "b", "p", "f", "n"]; + shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] :["5", "B", "P", "F", "N"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel:["6", "h", "k", "l", "j"]; - shiftedlabel:["6", "H", "K", "L", "J"]; + charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]:["6", "h", "k", "l", "j"]; + shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] :["6", "H", "K", "L", "J"]; leaves: charlabel; shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["*", "€", "^", "", "$"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["*", "€", "^", "", "$"] + shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : charlabel labelright:true leaves: charlabel shiftedleaves: shiftedlabel - iconDisabled: ["", "", "", "keyboard-caps-locked", ""] - iconAngles:["","","","90",""] } } @@ -103,30 +101,28 @@ KeyPad { CursorKey { leftSide:true; padding:0; } FlickCharKey { - charlabel: ["7", "]", "!", "[", "\\"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["7", "]", "!", "[", "\\"] + shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel:["8", "z", "x", "c", "v"] - shiftedlabel:["8", "Z", "X", "C", "V"]; + charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] :["8", "z", "x", "c", "v"] + shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] :["8", "Z", "X", "C", "V"]; leaves: charlabel shiftedleaves: shiftedlabel; } FlickCharKey { - charlabel: ["9", ")", "?", "(", "/"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["9", ")", "?", "(", "/"] + shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: ["=", "₹", "£", "", "¥"] + charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["=", "₹", "£", "", "¥"] leaves: charlabel - shiftedlabel: charlabel + shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : charlabel shiftedleaves: shiftedlabel - iconDisabled: ["", "", "", "keyboard-caps-locked", ""] - iconAngles:["","","","90",""] } } @@ -136,23 +132,23 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: [",", ">", "&", "<", "_"] - shiftedlabel: charlabel - leaves: [",", ">", "&", "<", "_"] - shiftedleaves:leaves + charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] + shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel + leaves: charlabel + shiftedleaves:shiftedlabel } FlickCharKey { - charlabel: ["0", "'", "`", "\"", "%"] - shiftedlabel: charlabel + charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] + shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : charlabel leaves: charlabel shiftedleaves: shiftedlabel } StringKey { - charlabel: [".", ".io", ".com", ".org",".net"] - shiftedlabel: [".", "}", "#", "{", "@"]; - leaves: [".", ".io", ".com", ".org",".net"] - shiftedleaves:[".", "}", "#", "{", "@"]; - unstyledLeaves: (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: [".", "}", "#", "{", "@"]; + charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : [".", ".io", ".com", ".org",".net"] + shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : [".", "}", "#", "{", "~"]; + leaves: symojiKey.state == "marks" ? charlabel : [".", ".io", ".com", ".org",".net"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : [".", "}", "#", "{", "~"]; + unstyledLeaves: symojiKey.state == "marks" ? shiftedlabel : (panel.activeKeypadState === "NORMAL") ? [".", ".io", ".com", ".org",".net"]: shiftedlabel; } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} } diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index e1d5ee310..fde1c5809 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,9 +20,9 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey - charlabel: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "a!", "", ""] : ["", "", "", "", "a!"] - leaves: (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : (state == "marks") ? ["", "", "a!", "", ""] : ["", "", "", "", "a!"] - iconNormal: panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : (state == "marks") ? ["settings", "", "", "", ""] : ["navigation-menu", "", "", "", ""] + charlabel: (state == "marks") ? ["", "", "a!", "", ""] : (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : ["", "", "", "", "a!"] + leaves: (state == "marks") ? ["", "", "a!", "", ""] : (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : ["", "", "", "", "a!"] + iconNormal: (state == "marks") ? ["settings", "", "", "", ""] : panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : ["navigation-menu", "", "", "", ""] iconNormalSource: ["", "", "", "../images/happy.svg", ""] iconAngles:["","","","","180"] iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] @@ -72,12 +72,13 @@ FlickActionKey { canvas.languageMenuShown = true; } } else if (index == 2) { - panel.state = (panel.state == "ACCENTS" && state =="marks") ? "CHARACTERS" : "ACCENTS"; + panel.state = (state == "marks") ? "CHARACTERS" : "ACCENTS"; + state = (state == "marks") ? "signs" : "marks"; } else if (index == 3) { - //panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; - maliit_input_method.activeLanguage = "emoji"; + panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; } else if (index == 4) { if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; + else state="marks"; } } onPressed: { diff --git a/qml/languages/Keyboard_accents.qml b/qml/languages/Keyboard_accents.qml index 18891eaa2..785ddc0c8 100644 --- a/qml/languages/Keyboard_accents.qml +++ b/qml/languages/Keyboard_accents.qml @@ -32,21 +32,21 @@ KeyPad { spacing: 0 ActionKey{width:panel.keyWidth;height:layout.height;visHeight:height} FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ă", "ą", "ȧ", "ā", "ǎ"]: ["ã", "à", "â", "á", "ä"]; + charlabel: ["ã", "à", "â", "á", "ä"]; leaves: charlabel - shiftedlabel:symojiKey.state == "marks" ? ["Ă", "Ą", "Ȧ", "Ā", "Ǎ"] : ["Ã", "À", "Â", "Á", "Ä"]; + shiftedlabel: ["Ã", "À", "Â", "Á", "Ä"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ŭ", "ų", "ṁ", "ū", "ǔ"] : ["ũ", "ù", "û", "ú", "ü"]; + charlabel: ["ũ", "ù", "û", "ú", "ü"]; leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ŭ", "Ų", "Ṁ", "Ū", "Ǔ"] : ["Ũ", "Ù", "Û", "Ú", "Ü"]; + shiftedlabel: ["Ũ", "Ù", "Û", "Ú", "Ü"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ŏ", "ǫ", "ȯ", "ō", "ǒ"] : ["õ", "ò", "ô", "ó", "ö"]; + charlabel: ["õ", "ò", "ô", "ó", "ö"]; leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ŏ", "Ǫ", "Ȯ", "Ō", "Ǒ"] : ["Õ", "Ò", "Ô", "Ó", "Ö"]; + shiftedlabel: ["Õ", "Ò", "Ô", "Ó", "Ö"]; shiftedleaves: shiftedlabel } CaseSwitchKey { id: layout; labelright:true} @@ -57,35 +57,35 @@ KeyPad { spacing: 0 FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ω", "", "ɛ", "д", "ɵ"] : ["√", "", "±", "÷", "×"] + charlabel: ["√", "", "±", "÷", "×"] labelleft:true leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ω", "", "Ɛ", "Д", "Ɵ"] : ["✿", "", "∆", "。", "﹏"]; + shiftedlabel: ["✿", "", "∆", "。", "﹏"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ĕ", "ę", "ė", "ē", "ě"] : ["ẽ", "è", "ê", "é", "ë"]; + charlabel: ["ẽ", "è", "ê", "é", "ë"]; leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ĕ", "Ę", "Ė", "Ē", "Ě"] : ["Ẽ", "È", "Ê", "É", "Ë"]; + shiftedlabel: ["Ẽ", "È", "Ê", "É", "Ë"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ĭ", "į", "ḃ", "ī", "ǐ"] : ["ĩ", "ì", "î", "í", "ï"]; + charlabel: ["ĩ", "ì", "î", "í", "ï"]; leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ĭ", "Į", "Ḃ", "Ī", "Ǐ"] : ["Ĩ", "Ì", "Î", "Í", "Ï"]; + shiftedlabel: ["Ĩ", "Ì", "Î", "Í", "Ï"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["đ", "ķ", "ẏ", "ȳ", "ď"]: ["ỹ", "ỳ", "ŷ", "ý", "ÿ"]; + charlabel: ["ỹ", "ỳ", "ŷ", "ý", "ÿ"]; leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Đ", "Ķ", "Ẏ", "Ȳ", "Ď"] : ["Ỹ", "Ỳ", "Ŷ", "Ý", "Ÿ"]; + shiftedlabel: ["Ỹ", "Ỳ", "Ŷ", "Ý", "Ÿ"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["þ", "ŋ", "æ", "", "œ"] : ["¢", "™", "©", "", "®"]; + charlabel: ["¢", "™", "©", "", "®"]; labelright:true leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Þ", "Ŋ", "Æ", "", "Œ"] : ["ʖ", "๑", " ͡", "", " ͜"]; + shiftedlabel: ["ʖ", "๑", " ͡", "", " ͜"]; shiftedleaves: shiftedlabel } @@ -97,27 +97,27 @@ KeyPad { CursorKey { leftSide:true; padding: 0 } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ğ", "å", "ġ", "ǵ", "ǧ"] : ["–", "§", "¦", "ß", "⸘"] + charlabel: ["–", "§", "¦", "ß", "⸘"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ğ", "Å", "Ġ", "Ǵ", "Ǧ"] : ["ง", "ᕙ", "∀", "ᕗ", "⊸"]; + shiftedlabel: ["ง", "ᕙ", "∀", "ᕗ", "⊸"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ł", "ļ", "ṗ", "ĺ", "ľ"] : ["ñ", "ņ", "ṅ", "ń", "ň"] + charlabel: ["ñ", "ņ", "ṅ", "ń", "ň"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ł", "Ļ", "Ṗ", "Ĺ", "Ľ"] : ["Ñ", "Ń", "Ṅ", "Ņ", "Ň"]; + shiftedlabel: ["Ñ", "Ń", "Ṅ", "Ņ", "Ň"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ű", "ů", "ż", "ź", "ž"] : ["—", "ſ", "‽", "ı", "ð"] + charlabel: ["—", "ſ", "‽", "ı", "ð"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ű", "Ů", "Ż", "Ź", "Ž"] : ["ノ", "≧", "人", "≦", "ڡ"]; + shiftedlabel: ["ノ", "≧", "人", "≦", "ڡ"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ŧ", "ţ", "ṫ", "", "ť"] : ["¤", "♪", "☆", "", "✧"] + charlabel: ["¤", "♪", "☆", "", "✧"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ŧ", "Ţ", "Ṫ", "", "Ť"] : ["•", "ẙ", "·", "", "∴"]; + shiftedlabel: ["•", "ẙ", "·", "", "∴"]; shiftedleaves: shiftedlabel } } @@ -129,21 +129,21 @@ KeyPad { SymojiKey { id: symojiKey;} FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : ["„", "»", "‾", "«", "¿"] + charlabel: ["„", "»", "‾", "«", "¿"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : ["つ", "’̀", "ツ", "‘́", "ヮ"]; + shiftedlabel: ["つ", "’̀", "ツ", "‘́", "ヮ"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["≠", "“", "´", "”", "‰"] + charlabel: ["≠", "“", "´", "”", "‰"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ő", "Ç", "Ċ", "Ć", "Č"] : ["∇", "╰", "「", "╯", "┐"]; + shiftedlabel: ["∇", "╰", "「", "╯", "┐"]; shiftedleaves: shiftedlabel } FlickCharKey { - charlabel: symojiKey.state == "marks" ? ["ə", "ş", "ṡ", "ś", "š"] : ["…", "ª", "¨", "°", "¡"] + charlabel: ["…", "ª", "¨", "°", "¡"] leaves: charlabel - shiftedlabel: symojiKey.state == "marks" ? ["Ə", "Ş", "Ṡ", "Ś", "Š"] : ["∠", "☜", "゚", "☞", "」"]; + shiftedlabel: ["∠", "☜", "゚", "☞", "」"]; shiftedleaves: shiftedlabel } BackspaceKey { rightSide: true; width: panel.keyWidth;visHeight:layout.height;} From 80a9c7b58d655867bf40bc48aa502420309caeae Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 31 Mar 2021 13:34:08 -0300 Subject: [PATCH 52/57] fix bugs fix the emoji switch (again) fix the settings key on the "marks" layout show the languagemenu if the previous layout was the emoji layout --- qml/keys/SymojiKey.qml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index fde1c5809..24949c85e 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -59,15 +59,14 @@ FlickActionKey { onReleased: { if (index == 0) { - if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { - maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; - } else if(panel.state == "ACCENTS") { - if (state == "marks"){ - Qt.openUrlExternally("settings:///system/language"); - maliit_input_method.hide(); - }else { - canvas.languageMenuShown = true; - } + if(state == "marks") { + Qt.openUrlExternally("settings:///system/language"); + maliit_input_method.hide(); + } else if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { + if(maliit_input_method.previousLanguage == "emoji") + canvas.languageMenuShown = true; + else + maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; } else { canvas.languageMenuShown = true; } @@ -75,7 +74,8 @@ FlickActionKey { panel.state = (state == "marks") ? "CHARACTERS" : "ACCENTS"; state = (state == "marks") ? "signs" : "marks"; } else if (index == 3) { - panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; + //panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; + maliit_input_method.activeLanguage = "emoji"; } else if (index == 4) { if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; else state="marks"; From 11f4642d10f2e2a9a30dda6f30a9c2e89db20e2a Mon Sep 17 00:00:00 2001 From: fuseteam Date: Tue, 6 Apr 2021 18:45:55 +0000 Subject: [PATCH 53/57] fix bug when inputing < and & --- plugins/en@flick/qml/Keyboard_en@flick.qml | 4 ++-- plugins/en@flick/qml/Keyboard_en@flick_email.qml | 4 ++-- plugins/en@flick/qml/Keyboard_en@flick_url.qml | 4 ++-- plugins/en@flick/qml/Keyboard_en@flick_url_search.qml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/en@flick/qml/Keyboard_en@flick.qml b/plugins/en@flick/qml/Keyboard_en@flick.qml index 544dbe066..f09828d48 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick.qml @@ -134,8 +134,8 @@ KeyPad { FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel - leaves: charlabel - shiftedleaves:shiftedlabel + leaves: symojiKey.state == "marks" ? charlabel : [",", ">", "&", "<", "_"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : leaves } FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] diff --git a/plugins/en@flick/qml/Keyboard_en@flick_email.qml b/plugins/en@flick/qml/Keyboard_en@flick_email.qml index 6117def18..28ce9468b 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_email.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_email.qml @@ -134,8 +134,8 @@ KeyPad { FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel - leaves: charlabel - shiftedleaves:shiftedlabel + leaves: symojiKey.state == "marks" ? charlabel : [",", ">", "&", "<", "_"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : leaves } FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url.qml b/plugins/en@flick/qml/Keyboard_en@flick_url.qml index 6117def18..28ce9468b 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url.qml @@ -134,8 +134,8 @@ KeyPad { FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel - leaves: charlabel - shiftedleaves:shiftedlabel + leaves: symojiKey.state == "marks" ? charlabel : [",", ">", "&", "<", "_"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : leaves } FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] diff --git a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml index 6117def18..28ce9468b 100644 --- a/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml +++ b/plugins/en@flick/qml/Keyboard_en@flick_url_search.qml @@ -134,8 +134,8 @@ KeyPad { FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ø", "ŗ", "ṙ", "ŕ", "ř"] : [",", ">", "&", "<", "_"] shiftedlabel: symojiKey.state == "marks" ? ["Ø", "Ŗ", "Ṙ", "Ŕ", "Ř"] : charlabel - leaves: charlabel - shiftedleaves:shiftedlabel + leaves: symojiKey.state == "marks" ? charlabel : [",", ">", "&", "<", "_"] + shiftedleaves: symojiKey.state == "marks" ? shiftedlabel : leaves } FlickCharKey { charlabel: symojiKey.state == "marks" ? ["ő", "ç", "ċ", "ć", "č"] : ["0", "'", "`", "\"", "%"] From 15f2300ed0e2d091f93138b357bea48fc1eef447 Mon Sep 17 00:00:00 2001 From: fuseteam Date: Tue, 6 Apr 2021 18:47:07 +0000 Subject: [PATCH 54/57] change symoji's behavior when there is only one layout --- qml/keys/SymojiKey.qml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 24949c85e..8b2464f20 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -20,10 +20,12 @@ import "key_constants.js" as UI FlickActionKey { id: symojiKey + property bool standard: (maliit_input_method.previousLanguage && panel.state == "CHARACTERS" && state == "signs") ? true : false + property bool stdsingle: (!maliit_input_method.previousLanguage && panel.state == "CHARACTERS" && state == "signs") ? true : false charlabel: (state == "marks") ? ["", "", "a!", "", ""] : (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : ["", "", "", "", "a!"] - leaves: (state == "marks") ? ["", "", "a!", "", ""] : (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : ["", "", "", "", "a!"] - iconNormal: (state == "marks") ? ["settings", "", "", "", ""] : panel.state == "CHARACTERS" ? ["language-chooser", "", "", "", ""] : ["navigation-menu", "", "", "", ""] - iconNormalSource: ["", "", "", "../images/happy.svg", ""] + leaves: charlabel + iconNormal: stdsingle? ["", "", "", "settings", ""]: ["language-chooser", "", "", "navigation-menu", ""] + iconNormalSource: standard ? ["", "", "", "happy.svg", ""] : maliit_input_method.previousLanguage ?["", "", "", "", ""]:["happy.svg", "", "", "", ""] iconAngles:["","","","","180"] iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] shiftedlabel: charlabel @@ -59,23 +61,23 @@ FlickActionKey { onReleased: { if (index == 0) { - if(state == "marks") { - Qt.openUrlExternally("settings:///system/language"); - maliit_input_method.hide(); - } else if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { - if(maliit_input_method.previousLanguage == "emoji") - canvas.languageMenuShown = true; - else + if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; } else { - canvas.languageMenuShown = true; + panel.state = "EMOJI"; } } else if (index == 2) { panel.state = (state == "marks") ? "CHARACTERS" : "ACCENTS"; state = (state == "marks") ? "signs" : "marks"; } else if (index == 3) { - //panel.state = (panel.state != "EMOJI") ? "EMOJI" : "CHARACTERS"; - maliit_input_method.activeLanguage = "emoji"; + if(standard) + panel.state = "EMOJI"; + else if(panel.state == "CHARACTERS" && state == "signs"){ + Qt.openUrlExternally("settings:///system/language") + maliit_input_method.hide(); + }else { + canvas.languageMenuShown = true; + } } else if (index == 4) { if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; else state="marks"; From bd1bc2698e5f13af1795176463a2252fa4a441c8 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 7 Apr 2021 10:08:16 -0300 Subject: [PATCH 55/57] fix icon source path --- qml/keys/SymojiKey.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 8b2464f20..8da79357c 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -25,7 +25,7 @@ FlickActionKey { charlabel: (state == "marks") ? ["", "", "a!", "", ""] : (panel.state == "CHARACTERS") ? ["", "", "ä‽", "", "īø"] : ["", "", "", "", "a!"] leaves: charlabel iconNormal: stdsingle? ["", "", "", "settings", ""]: ["language-chooser", "", "", "navigation-menu", ""] - iconNormalSource: standard ? ["", "", "", "happy.svg", ""] : maliit_input_method.previousLanguage ?["", "", "", "", ""]:["happy.svg", "", "", "", ""] + iconNormalSource: standard ? ["", "", "", "../images/happy.svg", ""] : maliit_input_method.previousLanguage ?["", "", "", "", ""]:["../images/happy.svg", "", "", "", ""] iconAngles:["","","","","180"] iconDisabled: ["", "", "keyboard-caps-locked", "", "keyboard-caps-locked"] shiftedlabel: charlabel From b7896dce25c5e79ed60647eba577f85ced619d57 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 7 Apr 2021 11:22:39 -0300 Subject: [PATCH 56/57] change the "accents" state to lower case --- qml/KeyboardContainer.qml | 10 +++------- qml/keys/SymojiKey.qml | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/qml/KeyboardContainer.qml b/qml/KeyboardContainer.qml index c489e5449..3f4e5b3b6 100644 --- a/qml/KeyboardContainer.qml +++ b/qml/KeyboardContainer.qml @@ -76,9 +76,6 @@ Item { }, State { name: "SYMBOLS" - }, - State { - name: "ACCENTS" } ] @@ -93,7 +90,6 @@ Item { property string characterKeypadSource: loadLayout(maliit_input_method.contentType, maliit_input_method.activeLanguage) property string symbolKeypadSource: activeKeypad ? activeKeypad.symbols : "" - property string accentsKeypadSource: activeKeypad ? activeKeypad.accents : "" onCharacterKeypadSourceChanged: { panel.state = "CHARACTERS"; @@ -102,10 +98,10 @@ Item { function loadKeypad() { if (panel.state === "CHARACTERS" ) { return characterKeypadSource; - } else if (panel.state === "ACCENTS") { - return accentsKeypadSource; - } else { + } else if (panel.state === "SYMBOLS") { return symbolKeypadSource; + } else { + return "languages/Keyboard_"+panel.state+".qml"; } } diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index 8da79357c..eb8442b5d 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -67,7 +67,7 @@ FlickActionKey { panel.state = "EMOJI"; } } else if (index == 2) { - panel.state = (state == "marks") ? "CHARACTERS" : "ACCENTS"; + panel.state = (state == "marks") ? "CHARACTERS" : "accents"; state = (state == "marks") ? "signs" : "marks"; } else if (index == 3) { if(standard) @@ -79,7 +79,7 @@ FlickActionKey { canvas.languageMenuShown = true; } } else if (index == 4) { - if(panel.state == "ACCENTS" && state =="signs") panel.state = "CHARACTERS"; + if(panel.state == "accents" && state =="signs") panel.state = "CHARACTERS"; else state="marks"; } } From 35736cc59c25e47d6a1c63ac5c5fd0e758155715 Mon Sep 17 00:00:00 2001 From: Fuseteam Date: Wed, 7 Apr 2021 11:59:02 -0300 Subject: [PATCH 57/57] change the case for emoji to lowercase --- qml/keys/SymojiKey.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/keys/SymojiKey.qml b/qml/keys/SymojiKey.qml index eb8442b5d..7be5665d1 100644 --- a/qml/keys/SymojiKey.qml +++ b/qml/keys/SymojiKey.qml @@ -64,14 +64,14 @@ FlickActionKey { if (maliit_input_method.previousLanguage && maliit_input_method.previousLanguage != maliit_input_method.activeLanguage && panel.state == "CHARACTERS") { maliit_input_method.activeLanguage = maliit_input_method.previousLanguage; } else { - panel.state = "EMOJI"; + panel.state = "emoji"; } } else if (index == 2) { panel.state = (state == "marks") ? "CHARACTERS" : "accents"; state = (state == "marks") ? "signs" : "marks"; } else if (index == 3) { if(standard) - panel.state = "EMOJI"; + panel.state = "emoji"; else if(panel.state == "CHARACTERS" && state == "signs"){ Qt.openUrlExternally("settings:///system/language") maliit_input_method.hide();