Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1384810 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 245
Merged at revision: 251
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1384810
Merge into: lp:ubuntu-keyboard
Diff against target: 33 lines (+5/-0)
2 files modified
qml/keys/CharKey.qml (+2/-0)
qml/keys/ReturnKey.qml (+3/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1384810
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+242229@code.launchpad.net

Commit message

Scale custom return key labels so that more characters fit and set correct default font size

Description of the change

Scale custom return key labels so that more characters fit and set correct default font size

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * Yes

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/keys/CharKey.qml'
2--- qml/keys/CharKey.qml 2014-10-07 15:44:46 +0000
3+++ qml/keys/CharKey.qml 2014-11-19 15:22:30 +0000
4@@ -135,6 +135,8 @@
5 color: UI.fontColor
6 anchors.right: parent.right
7 anchors.left: parent.left
8+ anchors.leftMargin: units.gu(0.2)
9+ anchors.rightMargin: units.gu(0.2)
10 anchors.verticalCenter: parent.verticalCenter
11 anchors.verticalCenterOffset: -units.gu(0.15)
12 horizontalAlignment: Text.AlignHCenter
13
14=== modified file 'qml/keys/ReturnKey.qml'
15--- qml/keys/ReturnKey.qml 2014-09-10 09:44:55 +0000
16+++ qml/keys/ReturnKey.qml 2014-11-19 15:22:30 +0000
17@@ -15,6 +15,7 @@
18 */
19
20 import QtQuick 2.0
21+import "key_constants.js" as UI
22
23 ActionKey {
24 property var actionKeyOverride: maliit_input_method.actionKeyOverride
25@@ -24,6 +25,8 @@
26 enabled: actionKeyOverride ? actionKeyOverride.enabled : true
27 // overrideIcon has high priority over label
28 label: overrideIconName == "" ? overrideLabel : ""
29+ // Scale the font so the label fits if a long word is set
30+ fontSize: units.gu(UI.symbolShiftKeyFontSize) * (4 / (label.length >= 4 ? (label.length <= 6 ? label.length : 6) : 4));
31 shifted: label
32
33 iconNormal: (overrideIconName == "") && (overrideLabel == "") ? "keyboard-return" : overrideIconName

Subscribers

People subscribed via source and target branches