Merge lp:~saviq/unity8/fix-generic-preview into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Approved by: Michał Sawicz
Approved revision: 193
Merged at revision: 210
Proposed branch: lp:~saviq/unity8/fix-generic-preview
Merge into: lp:unity8
Diff against target: 39 lines (+10/-2)
1 file modified
Dash/Generic/GenericPreview.qml (+10/-2)
To merge this branch: bzr merge lp:~saviq/unity8/fix-generic-preview
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+179932@code.launchpad.net

Commit message

Fix generic preview wrapping and force rich text parsing.

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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

As test, look for Elephant in the home scope and longpress in the one from the Info category

You'll see that without this, the text gets out of screen

Revision history for this message
Albert Astals Cid (aacid) wrote :

There's some small problems with wrapping sometimes, but it is a definite improvement over what we have, so i'm approving this and will log a bug about the wrapping since i don't see anything on our side that may be causing it (i.e. may very well be a Qt bug)

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

Much nicer

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/Generic/GenericPreview.qml'
2--- Dash/Generic/GenericPreview.qml 2013-08-09 10:06:19 +0000
3+++ Dash/Generic/GenericPreview.qml 2013-08-16 09:08:14 +0000
4@@ -74,25 +74,33 @@
5 spacing: units.gu(2)
6
7 Label {
8+ anchors { left: parent.left; right: parent.right }
9 visible: text != ""
10 fontSize: "medium"
11 opacity: 0.6
12 color: "white"
13- text: previewData.subtitle
14+ text: previewData.subtitle.replace(/[\r\n]+/g, "<br />")
15 style: Text.Raised
16 styleColor: "black"
17 wrapMode: Text.WordWrap
18+ textFormat: Text.RichText
19+ // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
20+ onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
21 }
22
23 Label {
24+ anchors { left: parent.left; right: parent.right }
25 visible: text != ""
26 fontSize: "small"
27 opacity: 0.6
28 color: "white"
29- text: previewData.description
30+ text: previewData.description.replace(/[\r\n]+/g, "<br />")
31 style: Text.Raised
32 styleColor: "black"
33 wrapMode: Text.WordWrap
34+ textFormat: Text.RichText
35+ // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
36+ onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
37 }
38 }
39 }

Subscribers

People subscribed via source and target branches