Merge lp:~libqtelegram-team/telegram-app/app-dev-elide-profile into lp:telegram-app/app-dev

Proposed by Michał Karnicki
Status: Merged
Approved by: Roberto Mier Escandon
Approved revision: 212
Merged at revision: 211
Proposed branch: lp:~libqtelegram-team/telegram-app/app-dev-elide-profile
Merge into: lp:telegram-app/app-dev
Diff against target: 63 lines (+9/-2)
2 files modified
components/TelegramSubtitledListItem.qml (+4/-1)
ui/ProfilePage.qml (+5/-1)
To merge this branch: bzr merge lp:~libqtelegram-team/telegram-app/app-dev-elide-profile
Reviewer Review Type Date Requested Status
libqtelegram team Pending
Review via email: mp+246325@code.launchpad.net

Description of the change

Elide text in user and group profile pages.

Tested by replacing the text with longer labels and confirming the text elides (title / subtitle; user name / status)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/TelegramSubtitledListItem.qml'
2--- components/TelegramSubtitledListItem.qml 2014-12-09 01:46:32 +0000
3+++ components/TelegramSubtitledListItem.qml 2015-01-13 16:11:02 +0000
4@@ -33,12 +33,13 @@
5 right: parent.right
6 rightMargin: units.gu(2)
7 }
8+ width: parent.width
9 verticalAlignment: TextInput.AlignVCenter
10
11 maximumLineCount: item.titleMaxLineCount
12- elide: Text.ElideRight
13 wrapMode: "WordWrap"
14
15+ elide: Text.ElideRight
16 font.pixelSize: FontUtils.sizeToPixels("large")
17 font.weight: item.titleIsBold ? Font.Bold : Font.Light
18 color: item.titleColor
19@@ -55,8 +56,10 @@
20 bottomMargin: units.gu(1)
21 right: title.right
22 }
23+ width: parent.width
24 verticalAlignment: TextInput.AlignVCenter
25
26+ elide: Text.ElideRight
27 font.pixelSize: FontUtils.sizeToPixels("medium")
28 font.weight: item.subtitleIsBold ? Font.Bold : Font.Light
29 color: item.subtitleColor
30
31=== modified file 'ui/ProfilePage.qml'
32--- ui/ProfilePage.qml 2014-11-26 22:16:49 +0000
33+++ ui/ProfilePage.qml 2015-01-13 16:11:02 +0000
34@@ -30,7 +30,7 @@
35 if (user.classType === TLUser.TypeUserEmpty || user.classType === TLUser.TypeUserDeleted) {
36 userExists = false;
37 contactNameText.text = i18n.tr("DELETED");
38- } else {
39+ } else {
40 contactNameText.text = user.firstName + " " + user.lastName;
41 }
42 if (user.phone !== "") {
43@@ -124,16 +124,20 @@
44
45 Label {
46 id: contactNameText
47+ width: parent.width
48 font.bold: true
49 fontSize: "large"
50 color: TelegramColors.black
51 text: i18n.tr("Unknown")
52+ elide: Text.ElideRight
53 }
54
55 Label {
56 id: lastSeenText
57+ width: parent.width
58 color: TelegramColors.grey
59 text: i18n.tr("last seen - unknown")
60+ elide: Text.ElideRight
61 }
62 }
63 }

Subscribers

People subscribed via source and target branches

to all changes: