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
=== modified file 'places/TextCustom.qml'
--- places/TextCustom.qml 2011-12-01 15:27:35 +0000
+++ places/TextCustom.qml 2011-12-08 00:35:14 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 1.019import QtQuick 1.1
20import "fontUtils.js" as FontUtils20import "fontUtils.js" as FontUtils
2121
22/* Custom Text factorising the font style. */22/* Custom Text factorising the font style. */
2323
=== modified file 'places/TextMultiLine.qml'
--- places/TextMultiLine.qml 2011-06-23 17:08:53 +0000
+++ places/TextMultiLine.qml 2011-12-08 00:35:14 +0000
@@ -16,22 +16,22 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 1.019import QtQuick 1.1
2020
21TextCustom {21TextCustom {
22 id: text22 id: text
2323
24 clip: true
25 wrapMode: Text.Wrap24 wrapMode: Text.Wrap
26 verticalAlignment: Text.AlignTop25 verticalAlignment: Text.AlignTop
26 maximumLineCount: 2
27 elide: Text.ElideRight
2728
28 states: [29 states: [
29 State {30 State {
30 name: "expanded"31 name: "expanded"
31 PropertyChanges {32 PropertyChanges {
32 target: text33 target: text
33 clip: false34 maximumLineCount: 5
34 height: paintedHeight
35 }35 }
36 }36 }
37 ]37 ]

Subscribers

People subscribed via source and target branches