Merge lp:~michael-sheldon/ubuntu-keyboard/desktop-improvements into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 545
Merged at revision: 544
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/desktop-improvements
Merge into: lp:ubuntu-keyboard
Diff against target: 136 lines (+25/-14)
5 files modified
qml/keys/CharKey.qml (+2/-2)
qml/keys/ExtendedKeysSelector.qml (+15/-2)
qml/keys/Magnifier.qml (+4/-2)
qml/keys/SpaceKey.qml (+2/-2)
qml/keys/key_constants.js (+2/-6)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/desktop-improvements
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+319932@code.launchpad.net

Commit message

Tweak sizes for desktop use

Description of the change

Tweak sizes for desktop use

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:543
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/3/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2316
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2315
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2137
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2137/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/3/rebuild

review: Approve (continuous-integration)
544. By Michael Sheldon

Fix scaling on magnifier and extended keys

545. By Michael Sheldon

Fix magnifier centering

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/keys/CharKey.qml'
--- qml/keys/CharKey.qml 2016-08-08 16:56:58 +0000
+++ qml/keys/CharKey.qml 2017-03-17 14:01:41 +0000
@@ -74,7 +74,7 @@
74 // be used, depending on the state. If no extended/extendedShifted arrays exist, no annotation is shown74 // be used, depending on the state. If no extended/extendedShifted arrays exist, no annotation is shown
75 property string annotation: ""75 property string annotation: ""
7676
77 /*! indicates if te key is currently pressed/down*/77 /*! indicates if the key is currently pressed/down*/
78 property alias currentlyPressed: keyMouseArea.pressed78 property alias currentlyPressed: keyMouseArea.pressed
7979
80 /* internal */80 /* internal */
@@ -176,7 +176,7 @@
176 anchors.topMargin: units.gu(UI.annotationTopMargin)176 anchors.topMargin: units.gu(UI.annotationTopMargin)
177 anchors.rightMargin: units.gu(UI.annotationRightMargin)177 anchors.rightMargin: units.gu(UI.annotationRightMargin)
178 font.family: UI.annotationFont178 font.family: UI.annotationFont
179 font.pixelSize: fullScreenItem.tablet ? units.dp(UI.tabletAnnotationFontSize) : units.dp(UI.phoneAnnotationFontSize)179 font.pixelSize: fontSize / 3
180 font.weight: Font.Light180 font.weight: Font.Light
181 color: UI.annotationFontColor181 color: UI.annotationFontColor
182 }182 }
183183
=== modified file 'qml/keys/ExtendedKeysSelector.qml'
--- qml/keys/ExtendedKeysSelector.qml 2016-01-26 12:35:10 +0000
+++ qml/keys/ExtendedKeysSelector.qml 2017-03-17 14:01:41 +0000
@@ -30,6 +30,7 @@
30 property alias keys: rowOfKeys.children30 property alias keys: rowOfKeys.children
31 property alias rowX: rowOfKeys.x31 property alias rowX: rowOfKeys.x
32 property alias rowY: rowOfKeys.y32 property alias rowY: rowOfKeys.y
33 property int fontSize: 0
3334
34 property int __width: 035 property int __width: 0
35 property string __commitStr: ""36 property string __commitStr: ""
@@ -44,7 +45,19 @@
44 reorderedModel.shift();45 reorderedModel.shift();
45 keyRepeater.model = reorderedModel;46 keyRepeater.model = reorderedModel;
46 } else {47 } else {
47 keyRepeater.model = extendedKeysModel48 keyRepeater.model = extendedKeysModel;
49 }
50
51 var longestKey = 1;
52 // Calculate font size based on longest key
53 if (extendedKeysModel != null) {
54 for(var i = 0; i < extendedKeysModel.length; i++) {
55 if (extendedKeysModel[i].length > longestKey) {
56 longestKey = extendedKeysModel[i].length;
57 }
58 }
59 fontSize = (fullScreenItem.landscape ? (panel.keyHeight / 2) : (panel.keyHeight / 2.8))
60 * (4 / (longestKey >= 2 ? (longestKey <= 6 ? longestKey + 2.5 : 8) : 4));
48 }61 }
49 }62 }
5063
@@ -115,7 +128,7 @@
115 anchors.centerIn: parent;128 anchors.centerIn: parent;
116 text: modelData129 text: modelData
117 font.family: UI.fontFamily130 font.family: UI.fontFamily
118 font.pixelSize: text.length > 2 ? units.gu( UI.smallFontSize ) : units.gu( UI.fontSize )131 font.pixelSize: fontSize
119 font.weight: Font.Light132 font.weight: Font.Light
120 color: key.highlight ? UI.selectionColor : UI.fontColor133 color: key.highlight ? UI.selectionColor : UI.fontColor
121 Component.onCompleted: __width += (textCell.width + units.gu( UI.popoverCellPadding));134 Component.onCompleted: __width += (textCell.width + units.gu( UI.popoverCellPadding));
122135
=== modified file 'qml/keys/Magnifier.qml'
--- qml/keys/Magnifier.qml 2016-01-26 12:35:10 +0000
+++ qml/keys/Magnifier.qml 2017-03-17 14:01:41 +0000
@@ -54,7 +54,6 @@
54 height: parent.height54 height: parent.height
5555
56 anchors.centerIn: anchorItem56 anchors.centerIn: anchorItem
57 anchors.verticalCenterOffset: -units.dp(UI.popoverTopMargin)
5857
59 // this property is used to synchronize scale and opacity animation58 // this property is used to synchronize scale and opacity animation
60 property real animationStep: 059 property real animationStep: 0
@@ -81,10 +80,13 @@
81 Text {80 Text {
82 id: label81 id: label
83 anchors.centerIn: parent82 anchors.centerIn: parent
83 height: parent.height
84 text: currentlyAssignedKey ? currentlyAssignedKey.valueToSubmit : ""84 text: currentlyAssignedKey ? currentlyAssignedKey.valueToSubmit : ""
85 font.family: UI.fontFamily85 font.family: UI.fontFamily
86 font.weight: Font.Light86 font.weight: Font.Light
87 font.pixelSize: units.gu( UI.fontSizeMagnified )87 font.pixelSize: panel.keyHeight * 0.6
88 verticalAlignment: Text.AlignVCenter
89
88 color: UI.fontColor90 color: UI.fontColor
89 }91 }
9092
9193
=== modified file 'qml/keys/SpaceKey.qml'
--- qml/keys/SpaceKey.qml 2016-04-18 15:23:00 +0000
+++ qml/keys/SpaceKey.qml 2017-03-17 14:01:41 +0000
@@ -33,9 +33,9 @@
33 Label {33 Label {
34 anchors.centerIn: parent34 anchors.centerIn: parent
35 anchors.verticalCenterOffset: -parent.rowMargin / 2 - units.gu(0.15)35 anchors.verticalCenterOffset: -parent.rowMargin / 2 - units.gu(0.15)
36 font.family: UI.spaceFontFamily36 font.family: UI.fontFamily
37 font.weight: Font.Light37 font.weight: Font.Light
38 fontSize: fullScreenItem.tablet ? UI.tabletSpaceFontSize : UI.phoneSpaceFontSize38 font.pixelSize: parent.fontSize * 0.6
39 opacity: UI.spaceOpacity39 opacity: UI.spaceOpacity
40 text: Languages.languageIdToName(maliit_input_method.activeLanguage)40 text: Languages.languageIdToName(maliit_input_method.activeLanguage)
41 horizontalAlignment: Text.AlignHCenter41 horizontalAlignment: Text.AlignHCenter
4242
=== modified file 'qml/keys/key_constants.js'
--- qml/keys/key_constants.js 2016-01-28 19:06:37 +0000
+++ qml/keys/key_constants.js 2017-03-17 14:01:41 +0000
@@ -19,7 +19,6 @@
19var tabletKeyMargins = 0.5; // gu19var tabletKeyMargins = 0.5; // gu
20var phoneKeyMargins = 0.25 // gu20var phoneKeyMargins = 0.25 // gu
21var fontSize = 2.5; // gu21var fontSize = 2.5; // gu
22var fontSizeMagnified = 4; // gu
23var fontFamily = "Ubuntu";22var fontFamily = "Ubuntu";
24var fontColor = "#333333";23var fontColor = "#333333";
25var fontBold = false;24var fontBold = false;
@@ -35,9 +34,6 @@
35var annotationFontColor = "#333333";34var annotationFontColor = "#333333";
36var annotationFont = "Ubuntu";35var annotationFont = "Ubuntu";
3736
38var spaceFontFamily = "Ubuntu";
39var tabletSpaceFontSize = "large";
40var phoneSpaceFontSize = "small";
41var spaceOpacity = 0.33;37var spaceOpacity = 0.33;
4238
43/* magnifier */39/* magnifier */
@@ -81,5 +77,5 @@
81var phoneKeyboardHeightPortrait = 0.40; // percent of screen77var phoneKeyboardHeightPortrait = 0.40; // percent of screen
82var phoneKeyboardHeightLandscape = 0.49; // percent of screen78var phoneKeyboardHeightLandscape = 0.49; // percent of screen
8379
84var tabletKeyboardHeightPortrait = 0.39; // percent of screen80var tabletKeyboardHeightPortrait = 0.31; // percent of screen
85var tabletKeyboardHeightLandscape = 0.42; // percent of screen81var tabletKeyboardHeightLandscape = 0.34; // percent of screen

Subscribers

People subscribed via source and target branches