Merge lp:~fboucault/unity-2d/proper_multiline_text into lp:unity-2d

Proposed by Florian Boucault
Status: Merged
Approved by: Gerry Boland
Approved revision: 807
Merged at revision: 816
Proposed branch: lp:~fboucault/unity-2d/proper_multiline_text
Merge into: lp:unity-2d
Diff against target: 43 lines (+5/-5)
2 files modified
places/TextCustom.qml (+1/-1)
places/TextMultiLine.qml (+4/-4)
To merge this branch: bzr merge lp:~fboucault/unity-2d/proper_multiline_text
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+84868@code.launchpad.net

Description of the change

[dash] Implemented multi line text properly:
- multiline text not fully displayed is now elided
- not displayed lines are not clipped but simply never shown

Fixes bug https://bugs.launchpad.net/unity-2d/+bug/901491

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

This is an improvement on the current situation so I would be happy to merge this.

Comparing with Unity however, it lays out multiline text like:

this is a very long filename which
...avoiding a truncation.ext

Hovering over it doesn't cause it to expand.

You have any comments on this? Could you run it by John?

Revision history for this message
Florian Boucault (fboucault) wrote :

> This is an improvement on the current situation so I would be happy to merge
> this.
>
> Comparing with Unity however, it lays out multiline text like:
>
> this is a very long filename which
> ...avoiding a truncation.ext
>
> Hovering over it doesn't cause it to expand.
>
> You have any comments on this? Could you run it by John?

It's a Unity 2D specific behaviour indeed. John is not very happy with it and would like a better solution but also considers it's definitely not a priority at the moment. Bottom line, we can keep it as it is.

Revision history for this message
Gerry Boland (gerboland) wrote :

Ok, in it goes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'places/TextCustom.qml'
2--- places/TextCustom.qml 2011-12-01 15:27:35 +0000
3+++ places/TextCustom.qml 2011-12-08 00:35:14 +0000
4@@ -16,7 +16,7 @@
5 * along with this program. If not, see <http://www.gnu.org/licenses/>.
6 */
7
8-import QtQuick 1.0
9+import QtQuick 1.1
10 import "fontUtils.js" as FontUtils
11
12 /* Custom Text factorising the font style. */
13
14=== modified file 'places/TextMultiLine.qml'
15--- places/TextMultiLine.qml 2011-06-23 17:08:53 +0000
16+++ places/TextMultiLine.qml 2011-12-08 00:35:14 +0000
17@@ -16,22 +16,22 @@
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21-import QtQuick 1.0
22+import QtQuick 1.1
23
24 TextCustom {
25 id: text
26
27- clip: true
28 wrapMode: Text.Wrap
29 verticalAlignment: Text.AlignTop
30+ maximumLineCount: 2
31+ elide: Text.ElideRight
32
33 states: [
34 State {
35 name: "expanded"
36 PropertyChanges {
37 target: text
38- clip: false
39- height: paintedHeight
40+ maximumLineCount: 5
41 }
42 }
43 ]

Subscribers

People subscribed via source and target branches