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
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Label.qml'
--- examples/ubuntu-ui-toolkit-gallery/Label.qml 2015-09-21 14:44:13 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Label.qml 2015-12-22 11:37:15 +0000
@@ -28,27 +28,27 @@
2828
29 Label {29 Label {
30 textSize: Label.XxSmall30 textSize: Label.XxSmall
31 text: "xx-small"31 text: "Label.XxSmall"
32 }32 }
33 Label {33 Label {
34 textSize: Label.XSmall34 textSize: Label.XSmall
35 text: "x-small"35 text: "Label.XSmall"
36 }36 }
37 Label {37 Label {
38 textSize: Label.Small38 textSize: Label.Small
39 text: "small"39 text: "Label.Small"
40 }40 }
41 Label {41 Label {
42 textSize: Label.Medium42 textSize: Label.Medium
43 text: "medium"43 text: "Label.Medium"
44 }44 }
45 Label {45 Label {
46 textSize: Label.Large46 textSize: Label.Large
47 text: "large"47 text: "Label.Large"
48 }48 }
49 Label {49 Label {
50 textSize: Label.XLarge50 textSize: Label.XLarge
51 text: "x-large"51 text: "Label.XLarge"
52 }52 }
53 }53 }
54 }54 }
5555
=== modified file 'src/Ubuntu/Components/plugin/ucfontutils.h'
--- src/Ubuntu/Components/plugin/ucfontutils.h 2015-09-22 14:39:47 +0000
+++ src/Ubuntu/Components/plugin/ucfontutils.h 2015-12-22 11:37:15 +0000
@@ -26,12 +26,12 @@
2626
27public:27public:
28 static constexpr float fontUnits = 14.0f;28 static constexpr float fontUnits = 14.0f;
29 static constexpr float xxSmallScale = 0.677f;29 static constexpr float xxSmallScale = 0.606f;
30 static constexpr float xSmallScale = 0.804f;30 static constexpr float xSmallScale = 0.707f;
31 static constexpr float smallScale = 0.931f;31 static constexpr float smallScale = 0.857f;
32 static constexpr float mediumScale = 1.079f;32 static constexpr float mediumScale = 1.0f;
33 static constexpr float largeScale = 1.291f;33 static constexpr float largeScale = 1.414f;
34 static constexpr float xLargeScale = 1.714f;34 static constexpr float xLargeScale = 1.905f;
3535
36 static UCFontUtils& instance()36 static UCFontUtils& instance()
37 {37 {
3838
=== modified file 'tests/unit/tst_components/tst_fontutils.qml'
--- tests/unit/tst_components/tst_fontutils.qml 2015-03-03 13:20:06 +0000
+++ tests/unit/tst_components/tst_fontutils.qml 2015-12-22 11:37:15 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2012 Canonical Ltd.2 * Copyright 2012-2015 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -22,12 +22,12 @@
22 name: "FontUtilsAPI"22 name: "FontUtilsAPI"
2323
24 function test_modularScale() {24 function test_modularScale() {
25 compare(FontUtils.modularScale("xx-small"), 0.677, "xx-small scale");25 compare(FontUtils.modularScale("xx-small"), 0.606, "xx-small scale");
26 compare(FontUtils.modularScale("x-small"), 0.804, "x-small scale");26 compare(FontUtils.modularScale("x-small"), 0.707, "x-small scale");
27 compare(FontUtils.modularScale("small"), 0.931, "small scale");27 compare(FontUtils.modularScale("small"), 0.857, "small scale");
28 compare(FontUtils.modularScale("medium"), 1.079, "medium scale");28 compare(FontUtils.modularScale("medium"), 1.0, "medium scale");
29 compare(FontUtils.modularScale("large"), 1.291, "large scale");29 compare(FontUtils.modularScale("large"), 1.414, "large scale");
30 compare(FontUtils.modularScale("x-large"), 1.714, "x-large scale");30 compare(FontUtils.modularScale("x-large"), 1.905, "x-large scale");
31 }31 }
3232
33 function test_modularScale_failures() {33 function test_modularScale_failures() {
@@ -36,17 +36,16 @@
36 }36 }
3737
38 function test_sizeToPixels() {38 function test_sizeToPixels() {
39 compare(FontUtils.sizeToPixels("xx-small"), 0.677 * units.dp(14), "xx-small scale");39 compare(FontUtils.sizeToPixels("xx-small"), 0.606 * units.dp(14), "xx-small scale");
40 compare(FontUtils.sizeToPixels("x-small"), 0.804 * units.dp(14), "x-small scale");40 compare(FontUtils.sizeToPixels("x-small"), 0.707 * units.dp(14), "x-small scale");
41 compare(FontUtils.sizeToPixels("small"), 0.931 * units.dp(14), "small scale");41 compare(FontUtils.sizeToPixels("small"), 0.857 * units.dp(14), "small scale");
42 compare(FontUtils.sizeToPixels("medium"), 1.079 * units.dp(14), "medium scale");42 compare(FontUtils.sizeToPixels("medium"), 1.0 * units.dp(14), "medium scale");
43 compare(FontUtils.sizeToPixels("large"), 1.291 * units.dp(14), "large scale");43 compare(FontUtils.sizeToPixels("large"), 1.414 * units.dp(14), "large scale");
44 compare(FontUtils.sizeToPixels("x-large"), 1.714 * units.dp(14), "x-large scale");44 compare(FontUtils.sizeToPixels("x-large"), 1.905 * units.dp(14), "x-large scale");
45 }45 }
4646
47 function test_sizeToPixels_failures() {47 function test_sizeToPixels_failures() {
48 compare(FontUtils.sizeToPixels("xxsmall"), 0.0, "xxsmall not defined");48 compare(FontUtils.sizeToPixels("xxsmall"), 0.0, "xxsmall not defined");
49 compare(FontUtils.sizeToPixels("undefined"), 0.0, "undefined scale");49 compare(FontUtils.sizeToPixels("undefined"), 0.0, "undefined scale");
50 }50 }
51
52}51}

Subscribers

People subscribed via source and target branches