Merge lp:~tpeeters/ubuntu-ui-toolkit/fontSize into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1783
Merged at revision: 1792
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/fontSize
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 114 lines (+25/-26)
3 files modified
examples/ubuntu-ui-toolkit-gallery/Label.qml (+6/-6)
src/Ubuntu/Components/plugin/ucfontutils.h (+6/-6)
tests/unit/tst_components/tst_fontutils.qml (+13/-14)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/fontSize
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+280831@code.launchpad.net

Commit message

Update font sizes.

Description of the change

Reviewed by Jouni.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Could you also update the Gallery page pls?

review: Needs Fixing
1778. By Tim Peeters

re-trigger CI

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1779. By Tim Peeters

sync trunk

1780. By Tim Peeters

sync staging

1781. By Tim Peeters

update gallery

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1782. By Tim Peeters

link bug

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

I attached screenshots with the updated font sizes to the linked bug.

Revision history for this message
Jouni Helminen (jounihelminen) wrote :

looks good - let's go with it

1783. By Tim Peeters

sync staging

Revision history for this message
Zsombor Egri (zsombi) wrote :

All good and shiny now :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/ubuntu-ui-toolkit-gallery/Label.qml'
2--- examples/ubuntu-ui-toolkit-gallery/Label.qml 2015-09-21 14:44:13 +0000
3+++ examples/ubuntu-ui-toolkit-gallery/Label.qml 2015-12-22 11:37:15 +0000
4@@ -28,27 +28,27 @@
5
6 Label {
7 textSize: Label.XxSmall
8- text: "xx-small"
9+ text: "Label.XxSmall"
10 }
11 Label {
12 textSize: Label.XSmall
13- text: "x-small"
14+ text: "Label.XSmall"
15 }
16 Label {
17 textSize: Label.Small
18- text: "small"
19+ text: "Label.Small"
20 }
21 Label {
22 textSize: Label.Medium
23- text: "medium"
24+ text: "Label.Medium"
25 }
26 Label {
27 textSize: Label.Large
28- text: "large"
29+ text: "Label.Large"
30 }
31 Label {
32 textSize: Label.XLarge
33- text: "x-large"
34+ text: "Label.XLarge"
35 }
36 }
37 }
38
39=== modified file 'src/Ubuntu/Components/plugin/ucfontutils.h'
40--- src/Ubuntu/Components/plugin/ucfontutils.h 2015-09-22 14:39:47 +0000
41+++ src/Ubuntu/Components/plugin/ucfontutils.h 2015-12-22 11:37:15 +0000
42@@ -26,12 +26,12 @@
43
44 public:
45 static constexpr float fontUnits = 14.0f;
46- static constexpr float xxSmallScale = 0.677f;
47- static constexpr float xSmallScale = 0.804f;
48- static constexpr float smallScale = 0.931f;
49- static constexpr float mediumScale = 1.079f;
50- static constexpr float largeScale = 1.291f;
51- static constexpr float xLargeScale = 1.714f;
52+ static constexpr float xxSmallScale = 0.606f;
53+ static constexpr float xSmallScale = 0.707f;
54+ static constexpr float smallScale = 0.857f;
55+ static constexpr float mediumScale = 1.0f;
56+ static constexpr float largeScale = 1.414f;
57+ static constexpr float xLargeScale = 1.905f;
58
59 static UCFontUtils& instance()
60 {
61
62=== modified file 'tests/unit/tst_components/tst_fontutils.qml'
63--- tests/unit/tst_components/tst_fontutils.qml 2015-03-03 13:20:06 +0000
64+++ tests/unit/tst_components/tst_fontutils.qml 2015-12-22 11:37:15 +0000
65@@ -1,5 +1,5 @@
66 /*
67- * Copyright 2012 Canonical Ltd.
68+ * Copyright 2012-2015 Canonical Ltd.
69 *
70 * This program is free software; you can redistribute it and/or modify
71 * it under the terms of the GNU Lesser General Public License as published by
72@@ -22,12 +22,12 @@
73 name: "FontUtilsAPI"
74
75 function test_modularScale() {
76- compare(FontUtils.modularScale("xx-small"), 0.677, "xx-small scale");
77- compare(FontUtils.modularScale("x-small"), 0.804, "x-small scale");
78- compare(FontUtils.modularScale("small"), 0.931, "small scale");
79- compare(FontUtils.modularScale("medium"), 1.079, "medium scale");
80- compare(FontUtils.modularScale("large"), 1.291, "large scale");
81- compare(FontUtils.modularScale("x-large"), 1.714, "x-large scale");
82+ compare(FontUtils.modularScale("xx-small"), 0.606, "xx-small scale");
83+ compare(FontUtils.modularScale("x-small"), 0.707, "x-small scale");
84+ compare(FontUtils.modularScale("small"), 0.857, "small scale");
85+ compare(FontUtils.modularScale("medium"), 1.0, "medium scale");
86+ compare(FontUtils.modularScale("large"), 1.414, "large scale");
87+ compare(FontUtils.modularScale("x-large"), 1.905, "x-large scale");
88 }
89
90 function test_modularScale_failures() {
91@@ -36,17 +36,16 @@
92 }
93
94 function test_sizeToPixels() {
95- compare(FontUtils.sizeToPixels("xx-small"), 0.677 * units.dp(14), "xx-small scale");
96- compare(FontUtils.sizeToPixels("x-small"), 0.804 * units.dp(14), "x-small scale");
97- compare(FontUtils.sizeToPixels("small"), 0.931 * units.dp(14), "small scale");
98- compare(FontUtils.sizeToPixels("medium"), 1.079 * units.dp(14), "medium scale");
99- compare(FontUtils.sizeToPixels("large"), 1.291 * units.dp(14), "large scale");
100- compare(FontUtils.sizeToPixels("x-large"), 1.714 * units.dp(14), "x-large scale");
101+ compare(FontUtils.sizeToPixels("xx-small"), 0.606 * units.dp(14), "xx-small scale");
102+ compare(FontUtils.sizeToPixels("x-small"), 0.707 * units.dp(14), "x-small scale");
103+ compare(FontUtils.sizeToPixels("small"), 0.857 * units.dp(14), "small scale");
104+ compare(FontUtils.sizeToPixels("medium"), 1.0 * units.dp(14), "medium scale");
105+ compare(FontUtils.sizeToPixels("large"), 1.414 * units.dp(14), "large scale");
106+ compare(FontUtils.sizeToPixels("x-large"), 1.905 * units.dp(14), "x-large scale");
107 }
108
109 function test_sizeToPixels_failures() {
110 compare(FontUtils.sizeToPixels("xxsmall"), 0.0, "xxsmall not defined");
111 compare(FontUtils.sizeToPixels("undefined"), 0.0, "undefined scale");
112 }
113-
114 }

Subscribers

People subscribed via source and target branches