Merge lp:~zsombi/ubuntu-ui-toolkit/dialog-title-fix into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Tim Peeters
Approved revision: 1228
Merged at revision: 1226
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/dialog-title-fix
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 62 lines (+47/-0)
2 files modified
modules/Ubuntu/Components/Popups/Dialog.qml (+3/-0)
tests/resources/popover/DialogTest.qml (+44/-0)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/dialog-title-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Review via email: mp+232386@code.launchpad.net

Commit message

Dialog title is wrapped into maximum two lines, then elides.

To post a comment you must log in.
Revision history for this message
Tim Peeters (tpeeters) wrote :

35 +import QtQuick 2.0
do we have a policy on which version we import?

48 + title: "A long title for the Doalog that wraps into two lines at least."
typo Doalog

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1226. By Zsombor Egri

comments applied

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1227. By Zsombor Egri

staging merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1228. By Zsombor Egri

staging merge

Revision history for this message
Tim Peeters (tpeeters) wrote :

thanks

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (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 'modules/Ubuntu/Components/Popups/Dialog.qml'
2--- modules/Ubuntu/Components/Popups/Dialog.qml 2014-08-21 05:24:14 +0000
3+++ modules/Ubuntu/Components/Popups/Dialog.qml 2014-08-29 12:07:38 +0000
4@@ -188,6 +188,9 @@
5 Label {
6 horizontalAlignment: Text.AlignHCenter
7 text: dialog.title
8+ wrapMode: Text.Wrap
9+ maximumLineCount: 2
10+ elide: Text.ElideRight
11 fontSize: "large"
12 color: UbuntuColors.darkGrey
13 }
14
15=== added file 'tests/resources/popover/DialogTest.qml'
16--- tests/resources/popover/DialogTest.qml 1970-01-01 00:00:00 +0000
17+++ tests/resources/popover/DialogTest.qml 2014-08-29 12:07:38 +0000
18@@ -0,0 +1,44 @@
19+/*
20+ * Copyright 2014 Canonical Ltd.
21+ *
22+ * This program is free software; you can redistribute it and/or modify
23+ * it under the terms of the GNU Lesser General Public License as published by
24+ * the Free Software Foundation; version 3.
25+ *
26+ * This program is distributed in the hope that it will be useful,
27+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
28+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29+ * GNU Lesser General Public License for more details.
30+ *
31+ * You should have received a copy of the GNU Lesser General Public License
32+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
33+ */
34+
35+import QtQuick 2.2
36+import Ubuntu.Components 1.1
37+import Ubuntu.Components.Popups 1.0
38+
39+MainView {
40+ width: units.gu(40)
41+ height: units.gu(71)
42+
43+ Component {
44+ id: dialog
45+
46+ Dialog {
47+ id: item
48+ title: "A long title for the Dialog that wraps into two lines at least."
49+ text: "This is a question text"
50+ Button {
51+ text: "Close"
52+ onClicked: PopupUtils.close(item)
53+ }
54+ }
55+ }
56+
57+ Button {
58+ text: "Open dialog"
59+ onClicked: PopupUtils.open(dialog)
60+ }
61+
62+}

Subscribers

People subscribed via source and target branches