Merge lp:~bfiller/gallery-app/fix-album-text into lp:gallery-app

Proposed by Bill Filler
Status: Merged
Approved by: Bill Filler
Approved revision: 1098
Merged at revision: 1100
Proposed branch: lp:~bfiller/gallery-app/fix-album-text
Merge into: lp:gallery-app
Diff against target: 66 lines (+5/-13)
2 files modified
rc/qml/AlbumViewer/AlbumCover.qml (+2/-10)
rc/qml/Components/TextEditOnClick.qml (+3/-3)
To merge this branch: bzr merge lp:~bfiller/gallery-app/fix-album-text
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Arthur Mello Pending
Review via email: mp+237878@code.launchpad.net

This proposal supersedes a proposal from 2014-10-08.

Commit message

Scale the album title proportionally to the album itself, so it works on all devices.

Description of the change

Scale the album title proportionally to the album itself, so it works on all devices.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote : Posted in a previous version of this proposal

lgtm

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/AlbumViewer/AlbumCover.qml'
2--- rc/qml/AlbumViewer/AlbumCover.qml 2013-06-20 11:54:49 +0000
3+++ rc/qml/AlbumViewer/AlbumCover.qml 2014-10-10 01:26:59 +0000
4@@ -87,10 +87,6 @@
5 height : xScale * (coverImageFull.height - 14)
6 }
7
8- // internal
9- // Scale text and spacers by factor of cover size.
10- property real textScale: isPreview || width <= 0 || cover.previewPixelWidth <= 0
11- ? 1 : coverImageFull.sourceSize.width / cover.previewPixelWidth
12 /*!
13 */
14 property real spacerScale: cover.height / units.gu(33) // ratio of image height to canonical height
15@@ -261,9 +257,7 @@
16 color: "#ffffff"
17
18 fontFamily: "Ubuntu"
19- // Subtract small amount due to a slight mismatch in preview vs.
20- // full album cover aspect ratios.
21- fontPointSize: (pointUnits(16) * textScale) - (isPreview ? 2 : 0)
22+ fontPixelSize: albumCover.height * 0.09
23 smooth: true
24 textFormat: TextEdit.PlainText
25
26@@ -319,9 +313,7 @@
27
28 fontFamily: "Ubuntu"
29
30- // Subtract small amount due to a slight mismatch in preview vs.
31- // full album cover aspect ratios.
32- fontPointSize: (pointUnits(10) * textScale) - (isPreview ? 1 : 0)
33+ fontPixelSize: albumCover.height * 0.07
34 smooth: true
35 textFormat: TextEdit.PlainText
36
37
38=== modified file 'rc/qml/Components/TextEditOnClick.qml'
39--- rc/qml/Components/TextEditOnClick.qml 2014-09-19 19:24:58 +0000
40+++ rc/qml/Components/TextEditOnClick.qml 2014-10-10 01:26:59 +0000
41@@ -52,7 +52,7 @@
42 property variant color: "#000000"
43 /*!
44 */
45- property real fontPointSize: 12.0
46+ property real fontPixelSize
47 /*!
48 */
49 property string fontFamily: "sans-serif"
50@@ -118,7 +118,7 @@
51 horizontalAlignment: textEditOnClick.horizontalAlignment
52 wrapMode: textEditOnClick.wrapMode
53 color: textEditOnClick.color
54- font.pointSize: textEditOnClick.fontPointSize
55+ font.pixelSize: textEditOnClick.fontPixelSize
56 font.family: textEditOnClick.fontFamily
57 maximumLineCount: textEditOnClick.maximumLineCount
58
59@@ -150,7 +150,7 @@
60 horizontalAlignment: textEditOnClick.horizontalAlignment
61 wrapMode: textEditOnClick.wrapMode
62 color: textEditOnClick.color
63- font.pointSize: textEditOnClick.fontPointSize
64+ font.pixelSize: textEditOnClick.fontPixelSize
65 font.family: textEditOnClick.fontFamily
66 inputMethodHints: Qt.ImhNoPredictiveText
67

Subscribers

People subscribed via source and target branches