Merge lp:~nick-dedekind/ubuntu-settings-components/indicator-polishing into lp:~registry/ubuntu-settings-components/trunk

Proposed by Nick Dedekind
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 108
Merged at revision: 78
Proposed branch: lp:~nick-dedekind/ubuntu-settings-components/indicator-polishing
Merge into: lp:~registry/ubuntu-settings-components/trunk
Prerequisite: lp:~nick-dedekind/ubuntu-settings-components/uqmlscene
Diff against target: 4066 lines (+1369/-1495)
58 files modified
CMakeLists.txt (+1/-0)
Ubuntu/Settings/Components/ActionTextField.qml (+35/-33)
Ubuntu/Settings/Components/CMakeLists.txt (+0/-2)
Ubuntu/Settings/Components/Calendar.qml (+2/-2)
Ubuntu/Settings/Components/IconVisual.qml (+0/-71)
Ubuntu/Settings/Components/MessageHeader.qml (+104/-134)
Ubuntu/Settings/Components/QuickReply.qml (+4/-4)
Ubuntu/Settings/Components/UbuntuShapeForItem.qml (+43/-0)
Ubuntu/Settings/Components/artwork/CMakeLists.txt (+0/-2)
Ubuntu/Settings/Components/qmldir (+2/-2)
Ubuntu/Settings/Menus/AccessPointMenu.qml (+14/-76)
Ubuntu/Settings/Menus/ButtonMenu.qml (+15/-13)
Ubuntu/Settings/Menus/CMakeLists.txt (+0/-2)
Ubuntu/Settings/Menus/CalendarMenu.qml (+3/-4)
Ubuntu/Settings/Menus/CheckableMenu.qml (+5/-13)
Ubuntu/Settings/Menus/EventMenu.qml (+9/-9)
Ubuntu/Settings/Menus/GroupedMessageMenu.qml (+28/-32)
Ubuntu/Settings/Menus/MediaPlayerMenu.qml (+39/-29)
Ubuntu/Settings/Menus/PlaybackItemMenu.qml (+53/-44)
Ubuntu/Settings/Menus/ProgressBarMenu.qml (+20/-12)
Ubuntu/Settings/Menus/ProgressValueMenu.qml (+9/-8)
Ubuntu/Settings/Menus/SectionMenu.qml (+2/-2)
Ubuntu/Settings/Menus/SeparatorMenu.qml (+3/-7)
Ubuntu/Settings/Menus/SimpleMessageMenu.qml (+66/-49)
Ubuntu/Settings/Menus/SimpleTextMessageMenu.qml (+0/-99)
Ubuntu/Settings/Menus/SliderMenu.qml (+6/-7)
Ubuntu/Settings/Menus/SnapDecisionMenu.qml (+64/-126)
Ubuntu/Settings/Menus/StandardMenu.qml (+24/-8)
Ubuntu/Settings/Menus/SwitchMenu.qml (+38/-37)
Ubuntu/Settings/Menus/TextMessageMenu.qml (+3/-4)
Ubuntu/Settings/Menus/TimeZoneMenu.qml (+10/-7)
Ubuntu/Settings/Menus/TransferMenu.qml (+24/-18)
Ubuntu/Settings/Menus/UserSessionMenu.qml (+28/-19)
Ubuntu/Settings/Menus/artwork/CMakeLists.txt (+0/-2)
Ubuntu/Settings/Menus/artwork/default_app.svg (+0/-42)
Ubuntu/Settings/Menus/artwork/secure.svg (+0/-71)
Ubuntu/Settings/Menus/qmldir (+1/-3)
debian/changelog (+8/-0)
debian/control (+2/-2)
examples/CMakeLists.txt (+2/-0)
examples/MessageComponents.qml (+119/-0)
examples/OtherComponents.qml (+237/-0)
examples/SettingsComponents.qml (+29/-254)
examples/TransferComponents.qml (+84/-0)
runtests.sh (+2/-2)
tests/qmltests/CMakeLists.txt (+3/-2)
tests/qmltests/Menus/tst_AccessPointMenu.qml (+3/-21)
tests/qmltests/Menus/tst_ButtonMenu.qml (+1/-1)
tests/qmltests/Menus/tst_CheckableMenu.qml (+2/-2)
tests/qmltests/Menus/tst_EventMenu.qml (+1/-1)
tests/qmltests/Menus/tst_GroupedMessageMenu.qml (+1/-1)
tests/qmltests/Menus/tst_MediaPlayerMenu.qml (+10/-10)
tests/qmltests/Menus/tst_PlaybackItemMenu.qml (+1/-1)
tests/qmltests/Menus/tst_SimpleMessageMenu.qml (+57/-50)
tests/qmltests/Menus/tst_SnapDecisionMenu.qml (+82/-95)
tests/qmltests/Menus/tst_SwitchMenu.qml (+2/-2)
tests/qmltests/Menus/tst_TextMessageMenu.qml (+67/-57)
tests/utils/modules/Ubuntu/Test/UbuntuTestCase.qml (+1/-1)
To merge this branch: bzr merge lp:~nick-dedekind/ubuntu-settings-components/indicator-polishing
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
Albert Astals Cid (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Zanetti (community) Needs Fixing
Review via email: mp+229083@code.launchpad.net

This proposal supersedes a proposal from 2014-07-29.

Description of the change

Visual changes for indicator RTM polishing sprint

https://docs.google.com/a/canonical.com/document/d/1KC40suUs13gajIlE1Ms6PJYoIPx_AjlF4ae6bvtNjNc/edit

 * Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~nick-dedekind/unity8/indicator-polishing/+merge/228700

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the UI, has there been a design review?
Yes

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
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
Nick Dedekind (nick-dedekind) wrote :

jenkins failing due to lacking xvfb-run

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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

Some comments, as well as I'd bump qt quick requirements to 2.2 on the files touched, and Ubuntu Components 1.1

review: Needs Fixing
Revision history for this message
Andrea Cimitan (cimi) wrote :

- Some listitems in the example qml have different highlight on press:
User account with lola chang, timezone one

- Status icon at the bottom doesn't seem to have padding or right size

- press effect on buttons seems a bit weird, like it changes size and font size

review: Needs Fixing
Revision history for this message
Andrea Cimitan (cimi) wrote :

Do we want to animate expansions of message components?

Revision history for this message
Andrea Cimitan (cimi) wrote :

Also, that might be a different issue (SDK) but when I move the slider, sometimes I can flick between pages.. be sure we don't have this in unity8, and if it happens to be a bug in sdk, file it

Revision history for this message
Andrea Cimitan (cimi) wrote :

if you can, would be nice to not shorten variable names or ids, like using animation instead ani

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

comments attached.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> - Some listitems in the example qml have different highlight on press:
> User account with lola chang, timezone one

Fixed. use StandardMenu now.

>
> - Status icon at the bottom doesn't seem to have padding or right size

The Status icons are just examples of their component usage. Not supposed to be padded.

>
> - press effect on buttons seems a bit weird, like it changes size and font
> size

This is sdk. Raise a bug if you think it's wrong.
Not sure which buttons you are talking about size and font. The ones in messaging are as designed (or defaulted in sdk). The other buttons are sized to text as in sdk

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Do we want to animate expansions of message components?

Yes. I put this back.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Also, that might be a different issue (SDK) but when I move the slider,
> sometimes I can flick between pages.. be sure we don't have this in unity8,
> and if it happens to be a bug in sdk, file it

SDK bug it would seem.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> if you can, would be nice to not shorten variable names or ids, like using
> animation instead ani

fixed.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
 * Did CI run pass? If not, please explain why.
Yes

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) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
 * Did CI run pass? If not, please explain why.
Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Breaks the indicators.

review: Needs Fixing
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
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
 * Did CI run pass? If not, please explain why.
No, seems unrelated

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

Please add a i18n.tr to

./Ubuntu/Settings/Components/QuickReply.qml:63: text: "Quick reply with:"

And also who are people translating the strings marked with i18n here? Doesn't seem to be a .pot file :S

review: Needs Fixing
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Please add a i18n.tr to
>
> ./Ubuntu/Settings/Components/QuickReply.qml:63: text: "Quick
> reply with:"

Done.

>
>
> And also who are people translating the strings marked with i18n here? Doesn't
> seem to be a .pot file :S

Hm. good point. I'll add it on another MP.

Revision history for this message
Andrea Cimitan (cimi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-07-31 16:52:12 +0000
3+++ CMakeLists.txt 2014-09-25 11:35:47 +0000
4@@ -96,4 +96,5 @@
5 enable_testing()
6
7 add_subdirectory(Ubuntu)
8+add_subdirectory(examples)
9 add_subdirectory(tests)
10
11=== modified file 'Ubuntu/Settings/Components/ActionTextField.qml'
12--- Ubuntu/Settings/Components/ActionTextField.qml 2013-10-04 12:38:07 +0000
13+++ Ubuntu/Settings/Components/ActionTextField.qml 2014-09-25 11:35:47 +0000
14@@ -19,7 +19,8 @@
15 */
16
17 import QtQuick 2.0
18-import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.1
20+import QtQuick.Layouts 1.1
21
22 Item {
23 id: textField
24@@ -29,43 +30,44 @@
25
26 signal activated(var value)
27
28- TextField {
29- id: replyField
30- objectName: "replyText"
31+ implicitHeight: layout.implicitHeight
32
33+ RowLayout {
34+ id: layout
35 anchors {
36- top: parent.top
37- bottom: parent.bottom
38 left: parent.left
39- right: sendButton.left
40- rightMargin: units.gu(1)
41- }
42- placeholderText: "Reply"
43- hasClearButton: false
44-
45- onEnabledChanged: {
46- //Make sure that the component lost focus when enabled = false,
47- //otherwise it will get focus again when enable = true
48- if (!enabled) {
49- focus = false;
50- }
51- }
52- }
53-
54- Button {
55- id: sendButton
56- objectName: "sendButton"
57- anchors {
58- top: parent.top
59- bottom: parent.bottom
60 right: parent.right
61 }
62- width: units.gu(9)
63- enabled: replyField.text !== "" && textField.activateEnabled
64- color: enabled ? "#c94212" : "#bababa"
65-
66- onClicked: {
67- textField.activated(replyField.text);
68+ spacing: units.gu(1)
69+
70+ TextField {
71+ id: replyField
72+ objectName: "replyText"
73+
74+ placeholderText: i18n.tr("Reply")
75+ hasClearButton: false
76+
77+ Layout.fillWidth: true
78+
79+ onEnabledChanged: {
80+ //Make sure that the component lost focus when enabled = false,
81+ //otherwise it will get focus again when enable = true
82+ if (!enabled) {
83+ focus = false;
84+ }
85+ }
86+ }
87+
88+ Button {
89+ id: sendButton
90+ objectName: "sendButton"
91+ Layout.preferredWidth: units.gu(9)
92+ enabled: replyField.text !== "" && textField.activateEnabled
93+ color: UbuntuColors.green
94+
95+ onClicked: {
96+ textField.activated(replyField.text);
97+ }
98 }
99 }
100 }
101
102=== modified file 'Ubuntu/Settings/Components/CMakeLists.txt'
103--- Ubuntu/Settings/Components/CMakeLists.txt 2014-06-27 09:35:26 +0000
104+++ Ubuntu/Settings/Components/CMakeLists.txt 2014-09-25 11:35:47 +0000
105@@ -1,3 +1,1 @@
106-add_subdirectory(artwork)
107-
108 add_usc_plugin(Ubuntu.Settings.Components 0.1 Ubuntu/Settings/Components)
109
110=== modified file 'Ubuntu/Settings/Components/Calendar.qml'
111--- Ubuntu/Settings/Components/Calendar.qml 2013-10-29 22:08:08 +0000
112+++ Ubuntu/Settings/Components/Calendar.qml 2014-09-25 11:35:47 +0000
113@@ -15,7 +15,7 @@
114 */
115
116 import QtQuick 2.0
117-import Ubuntu.Components 0.1
118+import Ubuntu.Components 1.1
119 import "dateExt.js" as DateExt
120
121 ListView {
122@@ -204,7 +204,7 @@
123
124 // Styling properties
125 property color color: Theme.palette.selected.backgroundText
126- property color todayColor: "#DD4814"
127+ property color todayColor: Theme.palette.selected.foreground
128 property string fontSize: "large"
129 property var backgroundColor: "transparent" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha)
130 property var sundayBackgroundColor: "#19AEA79F" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha)
131
132=== removed file 'Ubuntu/Settings/Components/IconVisual.qml'
133--- Ubuntu/Settings/Components/IconVisual.qml 2013-10-30 17:09:39 +0000
134+++ Ubuntu/Settings/Components/IconVisual.qml 1970-01-01 00:00:00 +0000
135@@ -1,71 +0,0 @@
136-/*
137- * Copyright 2012 Canonical Ltd.
138- *
139- * This program is free software; you can redistribute it and/or modify
140- * it under the terms of the GNU Lesser General Public License as published by
141- * the Free Software Foundation; version 3.
142- *
143- * This program is distributed in the hope that it will be useful,
144- * but WITHOUT ANY WARRANTY; without even the implied warranty of
145- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
146- * GNU Lesser General Public License for more details.
147- *
148- * You should have received a copy of the GNU Lesser General Public License
149- * along with this program. If not, see <http://www.gnu.org/licenses/>.
150- */
151-
152-import QtQuick 2.0
153-import Ubuntu.Components 0.1
154-
155-Item {
156- id: icon
157-
158- property url source
159- property alias color: colorizedImage.keyColorOut
160- property alias keyColor: colorizedImage.keyColorIn
161- property alias status: image.status
162-
163- Image {
164- id: image
165-
166- /* Necessary so that icons are not loaded before a size is set. */
167- property bool ready: false
168- Component.onCompleted: ready = true
169-
170- anchors.fill: parent
171- source: ready && width > 0 && height > 0 && icon.source ? icon.source : ""
172- sourceSize {
173- width: width
174- height: height
175- }
176- cache: true
177- visible: !colorizedImage.active
178- }
179-
180- ShaderEffect {
181- id: colorizedImage
182-
183- anchors.fill: parent
184- visible: active && image.status == Image.Ready
185-
186- // Whether or not a color has been set.
187- property bool active: keyColorOut != Qt.rgba(0.0, 0.0, 0.0, 0.0)
188-
189- property Image source: visible ? image : null
190- property color keyColorOut: Qt.rgba(0.0, 0.0, 0.0, 0.0)
191- property color keyColorIn: "#808080"
192- property real threshold: 0.6
193-
194- fragmentShader: source ? "
195- varying highp vec2 qt_TexCoord0;
196- uniform sampler2D source;
197- uniform highp vec4 keyColorOut;
198- uniform highp vec4 keyColorIn;
199- uniform lowp float threshold;
200- uniform lowp float qt_Opacity;
201- void main() {
202- lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
203- gl_FragColor = mix(vec4(keyColorOut.rgb, 1.0) * sourceColor.a, sourceColor, step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity;
204- }" : ""
205- }
206-}
207
208=== renamed file 'Ubuntu/Settings/Components/HeroMessageHeader.qml' => 'Ubuntu/Settings/Components/MessageHeader.qml'
209--- Ubuntu/Settings/Components/HeroMessageHeader.qml 2013-10-04 10:10:47 +0000
210+++ Ubuntu/Settings/Components/MessageHeader.qml 2014-09-25 11:35:47 +0000
211@@ -18,147 +18,117 @@
212 * Olivier Tilloy <olivier.tilloy@canonical.com>
213 */
214
215-import QtQuick 2.0
216-import Ubuntu.Components 0.1
217+import QtQuick 2.1
218+import Ubuntu.Components 1.1
219+import QtQuick.Layouts 1.1
220
221 Item {
222- id: heroMessageHeader
223+ id: messageHeader
224
225 property alias avatar: avatarImage.source
226 property alias icon: iconImage.source
227- property alias appIcon: appIconImage.source
228- property alias titleText: __titleText
229- property alias subtitleText: __subtitleText
230- property alias bodyText: __bodyText
231- property real bodyBottom: bodyText.y + bodyText.height
232-
233- signal appIconClicked()
234-
235- height: units.gu(9)
236-
237- UbuntuShape {
238- id: avatarImageContainer
239+ property alias title: titleText.text
240+ property alias time: timeText.text
241+ property alias body: bodyText.text
242+
243+ signal iconClicked()
244+
245+ implicitHeight: layout.height
246+
247+ function shakeIcon() {
248+ shake.restart();
249+ }
250+
251+ RowLayout {
252+ id: layout
253 anchors {
254- top: parent.top
255- topMargin: units.gu(2)
256 left: parent.left
257- leftMargin: units.gu(2)
258- }
259- height: units.gu(6)
260- width: units.gu(6)
261- image: Image {
262- id: avatarImage
263- objectName: "avatar"
264- fillMode: Image.PreserveAspectFit
265- }
266- }
267-
268- Image {
269- id: iconImage
270- objectName: "icon"
271- anchors {
272- top: parent.top
273- topMargin: units.gu(2)
274- left: avatarImageContainer.right
275- leftMargin: units.gu(1)
276- }
277- width: units.gu(2)
278- height: width
279- horizontalAlignment: Image.AlignHCenter
280- verticalAlignment: Image.AlignBottom
281- fillMode: Image.PreserveAspectFit
282- }
283-
284- Label {
285- id: __titleText
286- objectName: "title"
287- anchors {
288- baseline: iconImage.bottom
289- left: iconImage.right
290- leftMargin: units.gu(1)
291- right: __appIcon.left
292- rightMargin: units.gu(2)
293- }
294- elide: Text.ElideRight
295- font.weight: Font.DemiBold
296- fontSize: "medium"
297- }
298-
299- Label {
300- id: __subtitleText
301- objectName: "subtitle"
302- anchors {
303- baseline: __titleText.baseline
304- baselineOffset: units.gu(2.5)
305- left: __titleText.left
306- right: __titleText.right
307- }
308- elide: Text.ElideRight
309- fontSize: "small"
310- }
311-
312- Label {
313- id: __bodyText
314- objectName: "body"
315- anchors {
316- baseline: __subtitleText.baseline
317- baselineOffset: units.gu(2.5)
318- left: __titleText.left
319- right: parent.right
320- rightMargin: units.gu(2)
321- }
322- maximumLineCount: 2
323- wrapMode: Text.WordWrap
324- elide: Text.ElideRight
325- fontSize: "small"
326- }
327-
328- Item {
329- id: __appIcon
330- width: units.gu(7)
331- height: units.gu(7)
332- anchors {
333- top: parent.top
334- right: parent.right
335- }
336- opacity: 0.0
337- enabled: heroMessageHeader.state === "expanded"
338-
339- Image {
340- id: appIconImage
341- objectName: "appIcon"
342- height: width
343- anchors {
344- left: parent.left
345- leftMargin: units.gu(2)
346- right: parent.right
347- rightMargin: units.gu(2)
348- topMargin: units.gu(1)
349- verticalCenter: parent.verticalCenter
350- }
351- fillMode: Image.PreserveAspectFit
352- }
353-
354- MouseArea {
355- anchors.fill: parent
356- onClicked: heroMessageHeader.appIconClicked()
357- }
358- }
359-
360- states: State {
361- name: "expanded"
362-
363- PropertyChanges {
364- target: __appIcon
365- opacity: 1.0
366- }
367- }
368-
369- transitions: Transition {
370- NumberAnimation {
371- property: "opacity"
372- duration: 200
373- easing.type: Easing.OutQuad
374+ right: parent.right
375+ rightMargin: units.gu(4)
376+ }
377+ spacing: units.gu(2)
378+
379+ UbuntuShapeForItem {
380+ Layout.preferredWidth: units.gu(6)
381+ Layout.preferredHeight: units.gu(6)
382+
383+ image: avatarImage
384+ Icon {
385+ id: avatarImage
386+ objectName: "avatar"
387+ anchors.fill: parent
388+
389+ color: {
390+ if (String(source).match(/^image:\/\/theme/)) {
391+ return Theme.palette.selected.backgroundText;
392+ }
393+ return Qt.rgba(0.0, 0.0, 0.0, 0.0);
394+ }
395+ }
396+ }
397+
398+ ColumnLayout {
399+ Label {
400+ id: titleText
401+ objectName: "title"
402+
403+ maximumLineCount: 1
404+ elide: Text.ElideRight
405+ font.weight: Font.DemiBold
406+ fontSize: "medium"
407+
408+ Layout.fillWidth: true
409+ // calculate width with regard to the time's incursion into this layout's space.
410+ Layout.maximumWidth: layout.width - timeLayout.width - units.gu(4)
411+ }
412+ spacing: units.gu(0.5)
413+
414+ Label {
415+ id: bodyText
416+ objectName: "body"
417+
418+ maximumLineCount: 3
419+ wrapMode: Text.WordWrap
420+ elide: Text.ElideRight
421+ fontSize: "small"
422+
423+ Layout.fillWidth: true
424+ }
425+ }
426+ }
427+
428+ ColumnLayout {
429+ id: timeLayout
430+ anchors.right: parent.right
431+
432+ Label {
433+ id: timeText
434+ objectName: "time"
435+ elide: Text.ElideRight
436+ fontSize: "x-small"
437+ maximumLineCount: 1
438+ horizontalAlignment: Text.AlignRight
439+ }
440+ spacing: units.gu(0.5)
441+
442+ Icon {
443+ id: iconImage
444+ objectName: "icon"
445+ Layout.preferredHeight: units.gu(3)
446+ Layout.preferredWidth: units.gu(3)
447+ Layout.alignment: Qt.AlignRight
448+ color: Theme.palette.selected.backgroundText
449+
450+ MouseArea {
451+ anchors.fill: parent
452+ onClicked: messageHeader.iconClicked()
453+ }
454+
455+ SequentialAnimation {
456+ id: shake
457+ PropertyAnimation { target: iconImage; property: "rotation"; duration: 50; to: -20 }
458+ SpringAnimation { target: iconImage; property: "rotation"; from: -20; to: 0; mass: 0.5; spring: 15; damping: 0.1 }
459+ }
460 }
461 }
462 }
463
464=== modified file 'Ubuntu/Settings/Components/QuickReply.qml'
465--- Ubuntu/Settings/Components/QuickReply.qml 2013-10-29 17:40:23 +0000
466+++ Ubuntu/Settings/Components/QuickReply.qml 2014-09-25 11:35:47 +0000
467@@ -19,8 +19,8 @@
468 */
469
470 import QtQuick 2.0
471-import Ubuntu.Components 0.1
472-import Ubuntu.Components.ListItems 0.1 as ListItem
473+import Ubuntu.Components 1.1
474+import Ubuntu.Components.ListItems 1.0 as ListItem
475
476 Item {
477 id: quickReply
478@@ -53,14 +53,14 @@
479 width: units.gu(2)
480 height: width
481 fillMode: Image.PreserveAspectFit
482- source: "artwork/message_sms01_54px.png"
483+ source: "image://theme/message"
484 }
485
486 Label {
487 height: parent.height
488 verticalAlignment: Text.AlignVCenter
489 fontSize: "small"
490- text: "Quick reply with:"
491+ text: i18n.tr("Quick reply with:")
492 }
493 }
494
495
496=== added file 'Ubuntu/Settings/Components/UbuntuShapeForItem.qml'
497--- Ubuntu/Settings/Components/UbuntuShapeForItem.qml 1970-01-01 00:00:00 +0000
498+++ Ubuntu/Settings/Components/UbuntuShapeForItem.qml 2014-09-25 11:35:47 +0000
499@@ -0,0 +1,43 @@
500+/*
501+ * Copyright (C) 2014 Canonical, Ltd.
502+ *
503+ * This program is free software; you can redistribute it and/or modify
504+ * it under the terms of the GNU General Public License as published by
505+ * the Free Software Foundation; version 3.
506+ *
507+ * This program is distributed in the hope that it will be useful,
508+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
509+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
510+ * GNU General Public License for more details.
511+ *
512+ * You should have received a copy of the GNU General Public License
513+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
514+ */
515+
516+import QtQuick 2.0
517+import Ubuntu.Components 0.1
518+
519+/* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more
520+ * general (Item-based) components. This ability should be incorporated into the SDK's
521+ * UbuntuShape so this file can be removed.
522+ * Bug: https://bugs.launchpad.net/tavastia/+bug/1089595
523+ */
524+Item {
525+ property alias radius: shape.radius
526+ property alias image: source.sourceItem
527+
528+ ShaderEffectSource {
529+ id: source
530+ anchors.centerIn: parent // Placed under shape, so it's hidden
531+ width: 1
532+ height: 1
533+ hideSource: true
534+ }
535+
536+ UbuntuShape {
537+ id: shape
538+ image: source
539+
540+ anchors.fill: parent
541+ }
542+}
543
544=== removed directory 'Ubuntu/Settings/Components/artwork'
545=== removed file 'Ubuntu/Settings/Components/artwork/CMakeLists.txt'
546--- Ubuntu/Settings/Components/artwork/CMakeLists.txt 2014-06-27 09:35:26 +0000
547+++ Ubuntu/Settings/Components/artwork/CMakeLists.txt 1970-01-01 00:00:00 +0000
548@@ -1,2 +0,0 @@
549-# export the artwork files.
550-export_qmlfiles(Ubuntu.Settings.Components.Art Ubuntu/Settings/Components/artwork DESTINATION ${QT_IMPORTS_DIR})
551
552=== removed file 'Ubuntu/Settings/Components/artwork/message_sms01_54px.png'
553Binary files Ubuntu/Settings/Components/artwork/message_sms01_54px.png 2013-10-04 09:48:04 +0000 and Ubuntu/Settings/Components/artwork/message_sms01_54px.png 1970-01-01 00:00:00 +0000 differ
554=== modified file 'Ubuntu/Settings/Components/qmldir'
555--- Ubuntu/Settings/Components/qmldir 2014-06-30 15:36:05 +0000
556+++ Ubuntu/Settings/Components/qmldir 2014-09-25 11:35:47 +0000
557@@ -2,7 +2,7 @@
558
559 ActionTextField 0.1 ActionTextField.qml
560 Calendar 0.1 Calendar.qml
561-HeroMessageHeader 0.1 HeroMessageHeader.qml
562-IconVisual 0.1 IconVisual.qml
563+MessageHeader 0.1 MessageHeader.qml
564 QuickReply 0.1 QuickReply.qml
565 StatusIcon 0.1 StatusIcon.qml
566+UbuntuShapeForItem 0.1 UbuntuShapeForItem.qml
567
568=== modified file 'Ubuntu/Settings/Menus/AccessPointMenu.qml'
569--- Ubuntu/Settings/Menus/AccessPointMenu.qml 2014-05-22 23:58:14 +0000
570+++ Ubuntu/Settings/Menus/AccessPointMenu.qml 2014-09-25 11:35:47 +0000
571@@ -18,95 +18,33 @@
572 */
573
574 import QtQuick 2.0
575-import Ubuntu.Components 0.1
576-import Ubuntu.Components.ListItems 0.1 as ListItem
577+import Ubuntu.Components 1.1
578+import Ubuntu.Components.ListItems 1.0 as ListItem
579
580 ListItem.Empty {
581 id: menu
582- implicitHeight: units.gu(5.5)
583+ __height: units.gu(5.5)
584
585- property bool checked: false
586+ property bool active: false
587 property bool secure: false
588 property bool adHoc: false
589 property int signalStrength: 0
590 property alias text: label.text
591
592- __acceptEvents: false
593-
594- CheckBox {
595- id: checkbox
596- objectName: "checkBox"
597- property bool enableCheckConnection: true
598-
599- height: units.gu(3)
600- width: units.gu(3)
601-
602+ Icon {
603+ id: iconSignal
604+ objectName: "iconSignal"
605+
606+ color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText
607+
608+ width: height
609+ height: Math.min(units.gu(3), parent.height - units.gu(1))
610 anchors {
611 left: parent.left
612 leftMargin: menu.__contentsMargins
613 verticalCenter: parent.verticalCenter
614 }
615
616- // need onCompleted to set the initial value
617- // can't use binding otherwise we will get feedback from connections.
618- Component.onCompleted: {
619- enableCheckConnection = false;
620- checked = menu.checked;
621- enableCheckConnection = true;
622- }
623-
624- // FIXME : should use Checkbox.toggled signal
625- // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
626- onCheckedChanged: {
627- if (!enableCheckConnection) {
628- return;
629- }
630- var oldEnable = enableCheckConnection;
631- enableCheckConnection = false;
632-
633- menu.checked = checked;
634- menu.triggered(menu.checked);
635-
636- enableCheckConnection = oldEnable;
637- }
638-
639- Connections {
640- target: menu
641- onCheckedChanged: {
642- if (!checkbox.enableCheckConnection) {
643- return;
644- }
645- var oldEnable = checkbox.enableCheckConnection;
646- checkbox.enableCheckConnection = false;
647-
648- checkbox.checked = menu.checked;
649-
650- checkbox.enableCheckConnection = oldEnable;
651- }
652- }
653-
654- Connections {
655- target: menu.__mouseArea
656- onClicked: {
657- checkbox.clicked();
658- }
659- }
660- }
661-
662- Icon {
663- id: iconSignal
664- objectName: "iconSignal"
665-
666- color: Theme.palette.selected.backgroundText
667-
668- width: height
669- height: Math.min(units.gu(3), parent.height - units.gu(1))
670- anchors {
671- left: checkbox.right
672- leftMargin: units.gu(1)
673- verticalCenter: parent.verticalCenter
674- }
675-
676 name: {
677 var imageName = "nm-signal-100"
678
679@@ -135,7 +73,7 @@
680 rightMargin: menu.__contentsMargins
681 }
682 elide: Text.ElideRight
683- opacity: label.enabled ? 1.0 : 0.5
684+ color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText
685 }
686
687 Icon {
688@@ -144,7 +82,7 @@
689 visible: secure
690 name: "network-secure"
691
692- color: Theme.palette.selected.backgroundText
693+ color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText
694
695 width: height
696 height: Math.min(units.gu(3), parent.height - units.gu(1))
697
698=== modified file 'Ubuntu/Settings/Menus/ButtonMenu.qml'
699--- Ubuntu/Settings/Menus/ButtonMenu.qml 2013-10-29 17:40:23 +0000
700+++ Ubuntu/Settings/Menus/ButtonMenu.qml 2014-09-25 11:35:47 +0000
701@@ -17,18 +17,20 @@
702 */
703
704 import QtQuick 2.0
705-import Ubuntu.Components 0.1
706-import Ubuntu.Components.ListItems 0.1 as ListItem
707-
708-ListItem.Standard {
709- property alias buttonText: button.text
710-
711- iconFrame: false
712- Component.onCompleted: button.clicked.connect(clicked)
713-
714- control: Button {
715- id: button
716- objectName: "button"
717- width: Math.max(units.gu(5), implicitWidth)
718+import Ubuntu.Components 1.1
719+
720+StandardMenu {
721+ id: menu
722+ property string buttonText
723+
724+ component: Component {
725+ Button {
726+ id: button
727+ objectName: "button"
728+ text: menu.buttonText
729+ width: Math.max(units.gu(5), implicitWidth)
730+
731+ onClicked: menu.clicked()
732+ }
733 }
734 }
735
736=== modified file 'Ubuntu/Settings/Menus/CMakeLists.txt'
737--- Ubuntu/Settings/Menus/CMakeLists.txt 2014-06-27 13:56:26 +0000
738+++ Ubuntu/Settings/Menus/CMakeLists.txt 2014-09-25 11:35:47 +0000
739@@ -1,7 +1,5 @@
740 project(UbuntuSettingsMenusQml)
741
742-add_subdirectory(artwork)
743-
744 find_package(Qt5Core REQUIRED)
745
746 include_directories(
747
748=== modified file 'Ubuntu/Settings/Menus/CalendarMenu.qml'
749--- Ubuntu/Settings/Menus/CalendarMenu.qml 2013-10-04 10:04:18 +0000
750+++ Ubuntu/Settings/Menus/CalendarMenu.qml 2014-09-25 11:35:47 +0000
751@@ -17,8 +17,8 @@
752 */
753
754 import QtQuick 2.0
755-import Ubuntu.Components 0.1
756-import Ubuntu.Components.ListItems 0.1 as ListItem
757+import Ubuntu.Components 1.1
758+import Ubuntu.Components.ListItems 1.0 as ListItem
759 import Ubuntu.Settings.Components 0.1
760
761 ListItem.Empty {
762@@ -31,7 +31,7 @@
763 property alias minimumDate: calendar.minimumDate
764 property alias selectedDate: calendar.selectedDate
765
766- implicitHeight: column.height
767+ __height: column.height
768
769 Column {
770 id: column
771@@ -54,7 +54,6 @@
772 right: parent.right
773 }
774 fontSize: "large"
775- //ItemStyle.class: "label label-date"
776 text: Qt.formatDate(calendar.currentDate, "MMMM") + " " + calendar.currentDate.getFullYear()
777 }
778
779
780=== modified file 'Ubuntu/Settings/Menus/CheckableMenu.qml'
781--- Ubuntu/Settings/Menus/CheckableMenu.qml 2013-12-13 11:04:38 +0000
782+++ Ubuntu/Settings/Menus/CheckableMenu.qml 2014-09-25 11:35:47 +0000
783@@ -18,15 +18,16 @@
784 */
785
786 import QtQuick 2.0
787-import Ubuntu.Components 0.1 as Components
788-import Ubuntu.Components.ListItems 0.1 as ListItem
789+import Ubuntu.Components 1.1 as Components
790+import Ubuntu.Components.ListItems 1.0 as ListItem
791
792 ListItem.Empty {
793 id: menu
794
795 property alias text: label.text
796 property bool checked: false
797- __acceptEvents: false
798+
799+ onClicked: menu.checked = !menu.checked
800
801 Components.CheckBox {
802 id: checkbox
803@@ -43,8 +44,7 @@
804 checked = menu.checked;
805 }
806
807- // FIXME : should use Checkbox.toggled signal
808- // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
809+ // FIXME : create a bi-directional feedback component
810 onCheckedChanged: {
811 if (!enableCheckConnection) {
812 return;
813@@ -72,13 +72,6 @@
814 checkbox.enableCheckConnection = oldEnable;
815 }
816 }
817-
818- Connections {
819- target: menu.__mouseArea
820- onClicked: {
821- checkbox.clicked();
822- }
823- }
824 }
825
826 Components.Label {
827@@ -91,6 +84,5 @@
828 verticalCenter: parent.verticalCenter
829 }
830 elide: Text.ElideRight
831- opacity: label.enabled ? 1.0 : 0.5
832 }
833 }
834
835=== modified file 'Ubuntu/Settings/Menus/EventMenu.qml'
836--- Ubuntu/Settings/Menus/EventMenu.qml 2014-05-22 23:58:14 +0000
837+++ Ubuntu/Settings/Menus/EventMenu.qml 2014-09-25 11:35:47 +0000
838@@ -17,9 +17,8 @@
839 */
840
841 import QtQuick 2.0
842-import Ubuntu.Components 0.1 as Components
843-import Ubuntu.Settings.Components 0.1 as USC
844-import Ubuntu.Components.ListItems 0.1 as ListItems
845+import Ubuntu.Components 1.1
846+import Ubuntu.Components.ListItems 1.0 as ListItems
847
848 ListItems.Empty {
849 id: menu
850@@ -29,10 +28,10 @@
851 property alias time: dateLabel.text
852 property alias eventColor: iconVisual.color
853
854- USC.IconVisual {
855+ Icon {
856 id: iconVisual
857 source: "image://theme/calendar"
858- visible: status == Image.Ready
859+ visible: source != ""
860 color: Theme.palette.selected.backgroundText
861
862 height: Math.min(units.gu(3), parent.height - units.gu(1))
863@@ -45,7 +44,7 @@
864 }
865 }
866
867- Components.Label {
868+ Label {
869 id: label
870 anchors {
871 verticalCenter: parent.verticalCenter
872@@ -55,17 +54,18 @@
873 rightMargin: menu.__contentsMargins
874 }
875 elide: Text.ElideRight
876- opacity: label.enabled ? 1.0 : 0.5
877+ maximumLineCount: 1
878+ opacity: enabled ? 1.0 : 0.5
879 }
880
881- Components.Label {
882+ Label {
883 id: dateLabel
884- color: Theme.palette.normal.backgroundText
885
886 anchors {
887 verticalCenter: parent.verticalCenter
888 right: parent.right
889 rightMargin: menu.__contentsMargins
890 }
891+ opacity: enabled ? 1.0 : 0.5
892 }
893 }
894
895=== modified file 'Ubuntu/Settings/Menus/GroupedMessageMenu.qml'
896--- Ubuntu/Settings/Menus/GroupedMessageMenu.qml 2013-12-13 16:00:06 +0000
897+++ Ubuntu/Settings/Menus/GroupedMessageMenu.qml 2014-09-25 11:35:47 +0000
898@@ -19,44 +19,40 @@
899 */
900
901 import QtQuick 2.0
902-import Ubuntu.Components 0.1
903-import Ubuntu.Components.ListItems 0.1 as ListItem
904+import Ubuntu.Components 1.1
905+import Ubuntu.Components.ListItems 1.0 as ListItem
906
907-ListItem.Standard {
908+StandardMenu {
909 id: menu
910
911- property alias count: label.text
912+ property string count: "0"
913
914 signal dismissed()
915
916- iconSource: Qt.resolvedUrl("artwork/default_app.svg")
917-
918- control: UbuntuShape {
919- height: label.height + units.gu(2)
920- width: label.width + units.gu(2)
921- color: Theme.palette.normal.backgroundText
922- radius: "medium"
923-
924- Label {
925- id: label
926- objectName: "messageCount"
927-
928- anchors {
929- horizontalCenter: parent.horizontalCenter
930- verticalCenter: parent.verticalCenter
931- }
932- horizontalAlignment: Text.AlignRight
933- font.weight: Font.DemiBold
934- fontSize: "medium"
935- text: "0"
936-
937- color: Theme.palette.normal.foregroundText
938- }
939-
940- Connections {
941- target: menu.__mouseArea
942- onClicked: {
943- menu.clicked();
944+ iconSource: Qt.resolvedUrl("image://theme/message")
945+
946+ component: Component {
947+ UbuntuShape {
948+ height: label.implicitHeight + units.gu(2)
949+ width: label.implicitWidth + units.gu(2)
950+
951+ color: Theme.palette.normal.backgroundText
952+ radius: "medium"
953+
954+ Label {
955+ id: label
956+ objectName: "messageCount"
957+
958+ anchors {
959+ horizontalCenter: parent.horizontalCenter
960+ verticalCenter: parent.verticalCenter
961+ }
962+ horizontalAlignment: Text.AlignRight
963+ font.weight: Font.DemiBold
964+ fontSize: "medium"
965+ text: menu.count
966+
967+ color: Theme.palette.normal.foregroundText
968 }
969 }
970 }
971
972=== modified file 'Ubuntu/Settings/Menus/MediaPlayerMenu.qml'
973--- Ubuntu/Settings/Menus/MediaPlayerMenu.qml 2013-10-04 10:04:18 +0000
974+++ Ubuntu/Settings/Menus/MediaPlayerMenu.qml 2014-09-25 11:35:47 +0000
975@@ -17,13 +17,14 @@
976 */
977
978 import QtQuick 2.0
979-import Ubuntu.Components 0.1
980-import Ubuntu.Components.ListItems 0.1 as ListItem
981+import Ubuntu.Components 1.1
982+import Ubuntu.Components.ListItems 1.0 as ListItem
983+import QtQuick.Layouts 1.1
984
985 ListItem.Empty {
986 id: menu
987
988- property bool running: false
989+ property bool showTrack: false
990 property alias playerName: playerNameLabel.text
991 property alias playerIcon: playerIcon.source
992
993@@ -32,7 +33,7 @@
994 property alias artist: artistLabel.text
995 property alias album: albumLabel.text
996
997- implicitHeight: column.height + units.gu(2)
998+ __height: column.height + units.gu(2)
999 Behavior on implicitHeight { UbuntuNumberAnimation {} }
1000
1001 Column {
1002@@ -40,48 +41,43 @@
1003 anchors {
1004 left: parent.left
1005 right: parent.right
1006- top: parent.top
1007- topMargin: units.gu(1)
1008 leftMargin: menu.__contentsMargins
1009 rightMargin: menu.__contentsMargins
1010+ verticalCenter: parent.verticalCenter
1011 }
1012- height: running ? trackRow.height : playerRow.height
1013
1014- Row {
1015+ RowLayout {
1016 objectName: "player"
1017 id: playerRow
1018 spacing: menu.__contentsMargins
1019- visible: !running
1020-
1021- Behavior on opacity { UbuntuNumberAnimation {} }
1022-
1023- UbuntuShape {
1024- width: units.gu(5)
1025- height: width
1026-
1027- image: Image {
1028- id: playerIcon
1029- }
1030+ visible: !showTrack
1031+ anchors { left: parent.left; right: parent.right }
1032+
1033+ Image {
1034+ id: playerIcon
1035+ Layout.preferredHeight: units.gu(5)
1036+ Layout.preferredWidth: units.gu(5)
1037 }
1038
1039 Label {
1040 id: playerNameLabel
1041- anchors.verticalCenter: parent.verticalCenter
1042+ Layout.fillWidth: true
1043+ Layout.alignment: Qt.AlignVCenter
1044+ elide: Text.ElideRight
1045+ maximumLineCount: 1
1046 }
1047 }
1048
1049- Row {
1050+ RowLayout {
1051 objectName: "albumArt"
1052 id: trackRow
1053- width: menu.width
1054 spacing: units.gu(2)
1055- visible: running
1056-
1057- Behavior on opacity { UbuntuNumberAnimation {} }
1058+ visible: showTrack
1059+ anchors { left: parent.left; right: parent.right }
1060
1061 UbuntuShape {
1062- width: units.gu(10)
1063- height: width
1064+ Layout.preferredHeight: units.gu(8)
1065+ Layout.preferredWidth: units.gu(8)
1066
1067 image: Image {
1068 id: albumArtImage
1069@@ -89,19 +85,33 @@
1070 }
1071
1072 Column {
1073- spacing: units.gu(1)
1074- anchors.verticalCenter: parent.verticalCenter
1075+ Layout.alignment: Qt.AlignVCenter
1076+ Layout.fillWidth: true
1077+ spacing: units.gu(0.5)
1078
1079 Label {
1080 id: songLabel
1081+ elide: Text.ElideRight
1082+ maximumLineCount: 1
1083+ visible: text !== ""
1084+ anchors { left: parent.left; right: parent.right }
1085 }
1086
1087 Label {
1088 id: artistLabel
1089+ elide: Text.ElideRight
1090+ maximumLineCount: 1
1091+ visible: text !== ""
1092+ anchors { left: parent.left; right: parent.right }
1093 }
1094
1095 Label {
1096 id: albumLabel
1097+ elide: Text.ElideRight
1098+ maximumLineCount: 1
1099+ fontSize: "small"
1100+ visible: text !== ""
1101+ anchors { left: parent.left; right: parent.right }
1102 }
1103 }
1104 }
1105
1106=== modified file 'Ubuntu/Settings/Menus/PlaybackItemMenu.qml'
1107--- Ubuntu/Settings/Menus/PlaybackItemMenu.qml 2013-10-04 10:04:18 +0000
1108+++ Ubuntu/Settings/Menus/PlaybackItemMenu.qml 2014-09-25 11:35:47 +0000
1109@@ -17,8 +17,9 @@
1110 */
1111
1112 import QtQuick 2.0
1113-import Ubuntu.Components 0.1
1114-import Ubuntu.Components.ListItems 0.1 as ListItem
1115+import Ubuntu.Components 1.1
1116+import Ubuntu.Components.ListItems 1.0 as ListItem
1117+import QtQuick.Layouts 1.1
1118
1119 ListItem.Empty {
1120 id: menu
1121@@ -33,66 +34,74 @@
1122 signal play(bool play)
1123 signal previous()
1124
1125- implicitHeight: controlsRow.height + units.gu(2)
1126-
1127- Row {
1128- id: controlsRow
1129-
1130- anchors {
1131- top: parent.top
1132- topMargin: units.gu(1)
1133- horizontalCenter: parent.horizontalCenter
1134- }
1135- spacing: units.gu(2)
1136-
1137- Button {
1138+ highlightWhenPressed: false
1139+ implicitHeight: layout.implicitHeight + units.gu(2)
1140+
1141+ RowLayout {
1142+ id: layout
1143+ anchors.centerIn: parent
1144+ spacing: units.gu(3)
1145+
1146+ Icon {
1147 objectName: "previousButton"
1148- width: units.gu(5)
1149- height: width
1150- onClicked: menu.previous()
1151- text: ""
1152+
1153+ Layout.preferredWidth: units.gu(5)
1154+ Layout.preferredHeight: units.gu(5)
1155+
1156+ source: "image://theme/media-skip-backward"
1157+ color: {
1158+ if (!enabled)
1159+ return Theme.palette.normal.backgroundText;
1160+ return prevMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText;
1161+ }
1162 enabled: canGoPrevious
1163- anchors.verticalCenter: parent.verticalCenter
1164
1165- Icon {
1166+ MouseArea {
1167+ id: prevMA
1168 anchors.fill: parent
1169- anchors.margins: units.gu(1)
1170- name: "media-skip-backward"
1171- color: Theme.palette.normal.foregroundText
1172+ onClicked: menu.previous()
1173 }
1174 }
1175
1176- Button {
1177+ Icon {
1178 objectName: "playButton"
1179- width: units.gu(6)
1180- height: width
1181- onClicked: menu.play(!playing)
1182- text: ""
1183+
1184+ Layout.preferredWidth: units.gu(5)
1185+ Layout.preferredHeight: units.gu(5)
1186+
1187+ source: playing ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
1188+ color: {
1189+ if (!enabled)
1190+ return Theme.palette.normal.backgroundText;
1191+ return playMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText;
1192+ }
1193 enabled: canPlay
1194- anchors.verticalCenter: parent.verticalCenter
1195
1196- Icon {
1197+ MouseArea {
1198+ id: playMA
1199 anchors.fill: parent
1200- anchors.margins: units.gu(1)
1201- name: playing ? "media-playback-pause" : "media-playback-start"
1202- color: Theme.palette.normal.foregroundText
1203+ onClicked: menu.play(!playing)
1204 }
1205 }
1206
1207- Button {
1208+ Icon {
1209 objectName: "nextButton"
1210- width: units.gu(5)
1211- height: width
1212- onClicked: menu.next()
1213- text: ""
1214+
1215+ Layout.preferredWidth: units.gu(5)
1216+ Layout.preferredHeight: units.gu(5)
1217+
1218+ source: "image://theme/media-skip-forward"
1219+ color: {
1220+ if (!enabled)
1221+ return Theme.palette.normal.backgroundText;
1222+ return nextMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText;
1223+ }
1224 enabled: canGoNext
1225- anchors.verticalCenter: parent.verticalCenter
1226
1227- Icon {
1228+ MouseArea {
1229+ id: nextMA
1230 anchors.fill: parent
1231- anchors.margins: units.gu(1)
1232- name: "media-skip-forward"
1233- color: Theme.palette.normal.foregroundText
1234+ onClicked: menu.next()
1235 }
1236 }
1237 }
1238
1239=== modified file 'Ubuntu/Settings/Menus/ProgressBarMenu.qml'
1240--- Ubuntu/Settings/Menus/ProgressBarMenu.qml 2013-10-04 10:04:18 +0000
1241+++ Ubuntu/Settings/Menus/ProgressBarMenu.qml 2014-09-25 11:35:47 +0000
1242@@ -17,17 +17,25 @@
1243 */
1244
1245 import QtQuick 2.0
1246-import Ubuntu.Components 0.1
1247-import Ubuntu.Components.ListItems 0.1 as ListItem
1248-
1249-ListItem.Standard {
1250- property alias indeterminate: progressBar.indeterminate
1251- property alias minimumValue: progressBar.minimumValue
1252- property alias maximumValue: progressBar.maximumValue
1253- property alias value: progressBar.value
1254-
1255- control: ProgressBar {
1256- id: progressBar
1257- width: units.gu(20)
1258+import Ubuntu.Components 1.1
1259+import Ubuntu.Components.ListItems 1.0 as ListItem
1260+
1261+StandardMenu {
1262+ id: menu
1263+ property bool indeterminate: false
1264+ property real minimumValue: 0.0
1265+ property real maximumValue: 1.0
1266+ property real value: 0.0
1267+
1268+ component: Component {
1269+ ProgressBar {
1270+ id: progressBar
1271+ width: units.gu(20)
1272+
1273+ indeterminate: menu.indeterminate
1274+ minimumValue: menu.minimumValue
1275+ maximumValue: menu.maximumValue
1276+ value: menu.value
1277+ }
1278 }
1279 }
1280
1281=== modified file 'Ubuntu/Settings/Menus/ProgressValueMenu.qml'
1282--- Ubuntu/Settings/Menus/ProgressValueMenu.qml 2013-10-04 10:04:18 +0000
1283+++ Ubuntu/Settings/Menus/ProgressValueMenu.qml 2014-09-25 11:35:47 +0000
1284@@ -18,19 +18,20 @@
1285 */
1286
1287 import QtQuick 2.0
1288-import Ubuntu.Components 0.1
1289-import Ubuntu.Components.ListItems 0.1 as ListItem
1290+import Ubuntu.Components 1.1
1291
1292-ListItem.Standard {
1293+StandardMenu {
1294 id: menuItem
1295
1296 property int value : 0.0
1297
1298- control: Label {
1299- id: progress
1300- objectName: "progress"
1301+ component: Component {
1302+ Label {
1303+ id: progress
1304+ objectName: "progress"
1305
1306- text: menuItem.value + " %"
1307- fontSize: "medium"
1308+ text: menuItem.value + " %"
1309+ fontSize: "medium"
1310+ }
1311 }
1312 }
1313
1314=== modified file 'Ubuntu/Settings/Menus/SectionMenu.qml'
1315--- Ubuntu/Settings/Menus/SectionMenu.qml 2013-12-13 11:23:11 +0000
1316+++ Ubuntu/Settings/Menus/SectionMenu.qml 2014-09-25 11:35:47 +0000
1317@@ -18,8 +18,8 @@
1318 */
1319
1320 import QtQuick 2.0
1321-import Ubuntu.Components 0.1
1322-import Ubuntu.Components.ListItems 0.1 as ListItem
1323+import Ubuntu.Components 1.1
1324+import Ubuntu.Components.ListItems 1.0 as ListItem
1325
1326 ListItem.Header {
1327 id: menuItem
1328
1329=== modified file 'Ubuntu/Settings/Menus/SeparatorMenu.qml'
1330--- Ubuntu/Settings/Menus/SeparatorMenu.qml 2013-10-04 10:04:18 +0000
1331+++ Ubuntu/Settings/Menus/SeparatorMenu.qml 2014-09-25 11:35:47 +0000
1332@@ -1,11 +1,7 @@
1333 import QtQuick 2.0
1334-import Ubuntu.Components.ListItems 0.1 as ListItem
1335+import Ubuntu.Components.ListItems 1.0 as ListItem
1336
1337 ListItem.Empty {
1338- implicitHeight: units.gu(1)
1339-
1340- Rectangle {
1341- color: Qt.rgba(0.0, 0, 0, 0.15)
1342- anchors.fill: parent
1343- }
1344+ __height: units.gu(1)
1345+ highlightWhenPressed: false
1346 }
1347
1348=== renamed file 'Ubuntu/Settings/Menus/HeroMessageMenu.qml' => 'Ubuntu/Settings/Menus/SimpleMessageMenu.qml'
1349--- Ubuntu/Settings/Menus/HeroMessageMenu.qml 2013-10-29 17:40:23 +0000
1350+++ Ubuntu/Settings/Menus/SimpleMessageMenu.qml 2014-09-25 11:35:47 +0000
1351@@ -18,75 +18,92 @@
1352 * Olivier Tilloy <olivier.tilloy@canonical.com>
1353 */
1354
1355-import QtQuick 2.0
1356-import Ubuntu.Components 0.1
1357-import Ubuntu.Components.ListItems 0.1 as ListItem
1358+import QtQuick 2.1
1359+import Ubuntu.Components 1.1
1360+import Ubuntu.Components.ListItems 1.0 as ListItem
1361 import Ubuntu.Settings.Components 0.1 as USC
1362+import QtQuick.Layouts 1.1
1363
1364 ListItem.Empty {
1365 id: menu
1366
1367- property alias heroMessageHeader: __heroMessageHeader
1368- property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
1369- property real expandedHeight: collapsedHeight
1370+ property alias title: messageHeader.title
1371+ property alias time: messageHeader.time
1372+ property alias body: messageHeader.body
1373
1374 property url avatar
1375- property url appIcon
1376+ property url icon
1377
1378- signal appActivated
1379+ signal iconActivated
1380 signal dismissed
1381
1382- implicitHeight: collapsedHeight
1383-
1384- Rectangle {
1385- id: background
1386- property real alpha: 0.0
1387-
1388- anchors.fill: parent
1389- color: Qt.rgba(1.0, 1.0, 1.0, alpha)
1390- z: -1
1391- }
1392-
1393- USC.HeroMessageHeader {
1394- id: __heroMessageHeader
1395-
1396- anchors.top: parent.top
1397- anchors.left: parent.left
1398- anchors.right: parent.right
1399-
1400- avatar: menu.avatar != "" ? menu.avatar : "artwork/default_contact.png"
1401- appIcon: menu.appIcon != "" ? menu.appIcon : "artwork/default_app.svg"
1402- icon: appIcon
1403-
1404- state: menu.state
1405-
1406- onAppIconClicked: {
1407- menu.appActivated();
1408- }
1409- }
1410+ property alias footer: footerLoader.sourceComponent
1411+ property real _animationDuration: UbuntuAnimation.FastDuration
1412+
1413+ __height: layout.implicitHeight + units.gu(3)
1414+ clip: heightAnimation.running
1415+
1416+ ColumnLayout {
1417+ id: layout
1418+
1419+ anchors {
1420+ left: parent.left
1421+ right: parent.right
1422+ leftMargin: units.gu(2)
1423+ rightMargin: units.gu(2)
1424+ top: parent.top
1425+ topMargin: units.gu(1.5)
1426+ }
1427+ spacing: units.gu(1.5)
1428+
1429+ USC.MessageHeader {
1430+ id: messageHeader
1431+ Layout.fillWidth: true
1432+ Layout.alignment: Qt.AlignTop
1433+
1434+ avatar: menu.avatar != "" ? menu.avatar : "image://theme/contact"
1435+ icon: menu.icon != "" ? menu.icon : "image://theme/message"
1436+
1437+ state: menu.state
1438+
1439+ onIconClicked: {
1440+ menu.iconActivated();
1441+ }
1442+ }
1443+
1444+ Loader {
1445+ id: footerLoader
1446+ visible: menu.state === "expanded"
1447+ opacity: 0.0
1448+ asynchronous: false
1449+ Layout.fillWidth: true
1450+ Layout.fillHeight: true
1451+ }
1452+ }
1453+
1454+ Behavior on height {
1455+ NumberAnimation {
1456+ id: heightAnimation
1457+ duration: _animationDuration
1458+ easing.type: Easing.OutQuad
1459+ }
1460+ }
1461+
1462+ onTriggered: if (!footer || !selected) messageHeader.shakeIcon();
1463
1464 states: State {
1465 name: "expanded"
1466- when: selected
1467+ when: selected && footerLoader.status == Loader.Ready
1468
1469 PropertyChanges {
1470- target: menu
1471- implicitHeight: menu.expandedHeight
1472- }
1473- PropertyChanges {
1474- target: background
1475- alpha: 0.05
1476+ target: footerLoader
1477+ opacity: 1.0
1478 }
1479 }
1480
1481 transitions: Transition {
1482 ParallelAnimation {
1483- NumberAnimation {
1484- properties: "opacity,implicitHeight"
1485- duration: 200
1486- easing.type: Easing.OutQuad
1487- }
1488- ColorAnimation {}
1489+ PropertyAnimation { target: footerLoader; property: "opacity"; duration: _animationDuration }
1490 }
1491 }
1492
1493
1494=== removed file 'Ubuntu/Settings/Menus/SimpleTextMessageMenu.qml'
1495--- Ubuntu/Settings/Menus/SimpleTextMessageMenu.qml 2013-12-13 16:50:22 +0000
1496+++ Ubuntu/Settings/Menus/SimpleTextMessageMenu.qml 1970-01-01 00:00:00 +0000
1497@@ -1,99 +0,0 @@
1498-/*
1499- * Copyright 2013 Canonical Ltd.
1500- *
1501- * This program is free software; you can redistribute it and/or modify
1502- * it under the terms of the GNU Lesser General Public License as published by
1503- * the Free Software Foundation; version 3.
1504- *
1505- * This program is distributed in the hope that it will be useful,
1506- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1507- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1508- * GNU Lesser General Public License for more details.
1509- *
1510- * You should have received a copy of the GNU Lesser General Public License
1511- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1512- *
1513- * Authors:
1514- * Renato Araujo Oliveira Filho <renato@canonical.com>
1515- * Olivier Tilloy <olivier.tilloy@canonical.com>
1516- */
1517-
1518-import QtQuick 2.0
1519-import Ubuntu.Components 0.1
1520-
1521-HeroMessageMenu {
1522- id: menu
1523-
1524- property string title: ""
1525- property string time: ""
1526- property string message: ""
1527-
1528- property alias footer: footerLoader.sourceComponent
1529-
1530- expandedHeight: collapsedHeight + fullMessage.height
1531- heroMessageHeader.titleText.text: title
1532- heroMessageHeader.subtitleText.text: time
1533- heroMessageHeader.bodyText.text: message
1534-
1535- Item {
1536- id: fullMessage
1537-
1538- anchors {
1539- left: parent.left
1540- leftMargin: units.gu(2)
1541- right: parent.right
1542- rightMargin: units.gu(2)
1543- top: heroMessageHeader.bottom
1544- }
1545- height: childrenRect.height
1546- opacity: 0.0
1547- enabled: false
1548-
1549- Label {
1550- id: bodyText
1551- anchors {
1552- top: parent.top
1553- left: parent.left
1554- right: parent.right
1555- }
1556- wrapMode: Text.WordWrap
1557- elide: Text.ElideRight
1558- fontSize: "medium"
1559- text: heroMessageHeader.bodyText.text
1560- }
1561-
1562- Loader {
1563- id: footerLoader
1564-
1565- anchors {
1566- top: bodyText.bottom
1567- topMargin: item ? units.gu(2) : 0
1568- left: parent.left
1569- right: parent.right
1570- }
1571- height: item ? units.gu(4) : 0
1572- }
1573-
1574- states: State {
1575- name: "expanded"
1576- when: menu.state === "expanded"
1577-
1578- PropertyChanges {
1579- target: heroMessageHeader.bodyText
1580- opacity: 0.0
1581- }
1582-
1583- PropertyChanges {
1584- target: fullMessage
1585- opacity: 1.0
1586- enabled: true
1587- }
1588- }
1589- transitions: Transition {
1590- NumberAnimation {
1591- property: "opacity"
1592- duration: 200
1593- }
1594- }
1595- }
1596-}
1597
1598=== modified file 'Ubuntu/Settings/Menus/SliderMenu.qml'
1599--- Ubuntu/Settings/Menus/SliderMenu.qml 2014-05-27 14:36:33 +0000
1600+++ Ubuntu/Settings/Menus/SliderMenu.qml 2014-09-25 11:35:47 +0000
1601@@ -17,9 +17,8 @@
1602 */
1603
1604 import QtQuick 2.0
1605-import Ubuntu.Components 0.1
1606-import Ubuntu.Settings.Components 0.1 as USC
1607-import Ubuntu.Components.ListItems 0.1 as ListItem
1608+import Ubuntu.Components 1.1
1609+import Ubuntu.Components.ListItems 1.0 as ListItem
1610
1611 ListItem.Empty {
1612 id: menu
1613@@ -126,10 +125,10 @@
1614 }
1615 height: slider.height
1616
1617- USC.IconVisual {
1618+ Icon {
1619 id: leftButton
1620 objectName: "leftButton"
1621- visible: status === Image.Ready
1622+ visible: source != ""
1623 anchors.left: row.left
1624 anchors.verticalCenter: row.verticalCenter
1625 height: slider.height - units.gu(2)
1626@@ -182,10 +181,10 @@
1627 }
1628 }
1629
1630- USC.IconVisual {
1631+ Icon {
1632 id: rightButton
1633 objectName: "rightButton"
1634- visible: status === Image.Ready
1635+ visible: source != ""
1636 anchors.right: row.right
1637 anchors.verticalCenter: row.verticalCenter
1638 height: slider.height - units.gu(2)
1639
1640=== modified file 'Ubuntu/Settings/Menus/SnapDecisionMenu.qml'
1641--- Ubuntu/Settings/Menus/SnapDecisionMenu.qml 2013-10-29 17:40:23 +0000
1642+++ Ubuntu/Settings/Menus/SnapDecisionMenu.qml 2014-09-25 11:35:47 +0000
1643@@ -19,142 +19,80 @@
1644 */
1645
1646 import QtQuick 2.0
1647-import Ubuntu.Components 0.1
1648+import Ubuntu.Components 1.1
1649 import Ubuntu.Settings.Components 0.1 as USC
1650+import QtQuick.Layouts 1.1
1651
1652-HeroMessageMenu {
1653+SimpleMessageMenu {
1654 id: menu
1655
1656- property string title: ""
1657- property string time: ""
1658- property string message: ""
1659-
1660- property bool activateEnabled: true
1661- property alias actionButtonText: actionButton.text
1662+ property bool actionEnabled: true
1663+ property string actionButtonText: i18n.tr("Call back")
1664
1665 property bool replyEnabled: true
1666- property alias replyMessages: quickreply.messages
1667- property alias replyButtonText: quickreply.buttonText
1668-
1669- expandedHeight: collapsedHeight + buttons.height + quickreply.height
1670- heroMessageHeader.titleText.text: title
1671- heroMessageHeader.subtitleText.text: message
1672- heroMessageHeader.bodyText.text: time
1673-
1674- signal activated
1675+ property string replyButtonText: i18n.tr("Send")
1676+
1677+ signal actionActivated
1678 signal replied(string value)
1679
1680- Item {
1681+ footer: Item {
1682 id: buttons
1683
1684- anchors.left: parent.left
1685- anchors.leftMargin: units.gu(2)
1686- anchors.right: parent.right
1687- anchors.rightMargin: units.gu(2)
1688- anchors.top: heroMessageHeader.bottom
1689- anchors.topMargin: units.gu(1)
1690- height: units.gu(4)
1691- opacity: 0.0
1692-
1693- Button {
1694- objectName: "messageButton"
1695- text: "Message"
1696- anchors.left: parent.left
1697- anchors.top: parent.top
1698- anchors.bottom: parent.bottom
1699- width: (parent.width - units.gu(1)) / 2
1700- gradient: UbuntuColors.greyGradient
1701-
1702- onClicked: {
1703- if (quickreply.state === "") {
1704- quickreply.state = "expanded";
1705- } else {
1706- quickreply.state = "";
1707- }
1708- }
1709- }
1710-
1711- Button {
1712- id: actionButton
1713- objectName: "actionButton"
1714- text: "Call back"
1715- anchors.right: parent.right
1716- anchors.top: parent.top
1717- anchors.bottom: parent.bottom
1718- width: (parent.width - units.gu(1)) / 2
1719- enabled: menu.activateEnabled
1720-
1721- onClicked: {
1722- menu.activated();
1723- }
1724- }
1725-
1726- states: State {
1727- name: "expanded"
1728- when: menu.state === "expanded"
1729-
1730- PropertyChanges {
1731- target: buttons
1732- opacity: 1.0
1733- }
1734- }
1735- transitions: Transition {
1736- NumberAnimation {
1737- property: "opacity"
1738- duration: 200
1739- easing.type: Easing.OutQuad
1740- }
1741- }
1742- }
1743-
1744- USC.QuickReply {
1745- id: quickreply
1746-
1747- onReplied: {
1748- menu.replied(value);
1749- }
1750-
1751- messages: ""
1752- buttonText: "Send"
1753- anchors {
1754- top: buttons.bottom
1755- topMargin: units.gu(2)
1756- left: parent.left
1757- right: parent.right
1758- }
1759- height: 0
1760- opacity: 0.0
1761- enabled: false
1762- replyEnabled: menu.replyEnabled
1763- messageMargins: __contentsMargins
1764-
1765- states: State {
1766- name: "expanded"
1767-
1768- PropertyChanges {
1769- target: quickreply
1770- height: expandedHeight + units.gu(2)
1771- opacity: 1.0
1772- }
1773-
1774- PropertyChanges {
1775- target: quickreply
1776- enabled: true
1777- }
1778- }
1779-
1780- transitions: Transition {
1781- NumberAnimation {
1782- properties: "opacity,height"
1783- duration: 200
1784- easing.type: Easing.OutQuad
1785- }
1786- }
1787- }
1788-
1789- onStateChanged: {
1790- if (state === "") {
1791- quickreply.state = "";
1792+ implicitHeight: layout.implicitHeight
1793+
1794+ ColumnLayout {
1795+ id: layout
1796+ anchors {
1797+ left: parent.left
1798+ right: parent.right
1799+ }
1800+ spacing: units.gu(1)
1801+
1802+ RowLayout {
1803+ spacing: units.gu(2)
1804+
1805+ Button {
1806+ objectName: "messageButton"
1807+ text: i18n.tr("Message")
1808+ Layout.fillWidth: true
1809+
1810+ onClicked: {
1811+ if (reply.state === "") {
1812+ reply.state = "expanded";
1813+ } else {
1814+ reply.state = "";
1815+ }
1816+ }
1817+ }
1818+
1819+ Button {
1820+ id: actionButton
1821+ objectName: "actionButton"
1822+ enabled: menu.actionEnabled
1823+ text: actionButtonText
1824+ color: UbuntuColors.green
1825+ Layout.fillWidth: true
1826+
1827+ onClicked: {
1828+ menu.actionActivated();
1829+ }
1830+ }
1831+ }
1832+
1833+ USC.ActionTextField {
1834+ id: reply
1835+
1836+ Layout.fillWidth: true
1837+ Layout.fillHeight: true
1838+ visible: state == "expanded"
1839+
1840+ activateEnabled: menu.replyEnabled
1841+ buttonText: menu.replyButtonText
1842+
1843+ onActivated: {
1844+ menu.replied(value);
1845+ }
1846+ }
1847 }
1848 }
1849 }
1850
1851=== modified file 'Ubuntu/Settings/Menus/StandardMenu.qml'
1852--- Ubuntu/Settings/Menus/StandardMenu.qml 2014-07-01 12:15:17 +0000
1853+++ Ubuntu/Settings/Menus/StandardMenu.qml 2014-09-25 11:35:47 +0000
1854@@ -15,9 +15,8 @@
1855 */
1856
1857 import QtQuick 2.0
1858-import Ubuntu.Components 0.1 as Components
1859-import Ubuntu.Settings.Components 0.1 as USC
1860-import Ubuntu.Components.ListItems 0.1 as ListItems
1861+import Ubuntu.Components 1.1
1862+import Ubuntu.Components.ListItems 1.0 as ListItems
1863 import QtQuick.Layouts 1.1
1864
1865 ListItems.Empty {
1866@@ -27,9 +26,22 @@
1867 property alias text: label.text
1868 property alias iconColor: iconVisual.color
1869 property alias component: componentLoader.sourceComponent
1870+ property alias foregroundColor: label.color
1871+ property alias backColor: overlay.color
1872+
1873+ Rectangle {
1874+ id: overlay
1875+ color: "transparent"
1876+ visible: color !== "transparent"
1877+ anchors {
1878+ left: parent.left
1879+ right: parent.right
1880+ top: parent.top
1881+ }
1882+ height: menu.height - menu.divider.height
1883+ }
1884
1885 RowLayout {
1886-
1887 anchors {
1888 fill: parent
1889 leftMargin: menu.__contentsMargins
1890@@ -37,9 +49,9 @@
1891 }
1892 spacing: menu.__contentsMargins
1893
1894- USC.IconVisual {
1895+ Icon {
1896 id: iconVisual
1897- visible: status == Image.Ready
1898+ visible: source != ""
1899 color: Theme.palette.selected.backgroundText
1900
1901 readonly property real size: Math.min(units.gu(3), parent.height - menu.__contentsMargins)
1902@@ -49,18 +61,22 @@
1903 Layout.alignment: Qt.AlignVCenter
1904 }
1905
1906- Components.Label {
1907+ Label {
1908 id: label
1909 Layout.fillWidth: true
1910 Layout.alignment: Qt.AlignVCenter
1911
1912 elide: Text.ElideRight
1913 maximumLineCount: 1
1914- opacity: label.enabled ? 1.0 : 0.5
1915 }
1916
1917 Loader {
1918 id: componentLoader
1919+ asynchronous: false
1920+ visible: status == Loader.Ready
1921+
1922+ Layout.preferredHeight: item ? item.height : 0
1923+ Layout.preferredWidth: item ? item.width : 0
1924 }
1925 }
1926 }
1927
1928=== modified file 'Ubuntu/Settings/Menus/SwitchMenu.qml'
1929--- Ubuntu/Settings/Menus/SwitchMenu.qml 2013-10-29 17:40:23 +0000
1930+++ Ubuntu/Settings/Menus/SwitchMenu.qml 2014-09-25 11:35:47 +0000
1931@@ -18,51 +18,52 @@
1932 */
1933
1934 import QtQuick 2.0
1935-import Ubuntu.Components 0.1
1936-import Ubuntu.Components.ListItems 0.1 as ListItem
1937+import Ubuntu.Components 1.1
1938
1939-ListItem.Standard {
1940+StandardMenu {
1941 id: menu
1942
1943 property bool checked: false
1944- iconFrame: false
1945-
1946- control: Switch {
1947- id: switcher
1948- objectName: "switcher"
1949- property bool enableCheckConnection: true
1950-
1951- Component.onCompleted: {
1952- checked = menu.checked;
1953- }
1954-
1955- // FIXME : should use Checkbox.toggled signal
1956- // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled
1957- onCheckedChanged: {
1958- if (!enableCheckConnection) {
1959- return;
1960+
1961+ onClicked: menu.checked = !menu.checked
1962+
1963+ component: Component {
1964+ Switch {
1965+ id: switcher
1966+ objectName: "switcher"
1967+ property bool enableCheckConnection: true
1968+
1969+ Component.onCompleted: {
1970+ checked = menu.checked;
1971 }
1972- var oldEnable = enableCheckConnection;
1973- enableCheckConnection = false;
1974-
1975- menu.checked = checked;
1976- menu.triggered(menu.checked);
1977-
1978- enableCheckConnection = oldEnable;
1979- }
1980-
1981- Connections {
1982- target: menu
1983+
1984+ // FIXME : create a bi-directional feedback component
1985 onCheckedChanged: {
1986- if (!switcher.enableCheckConnection) {
1987+ if (!enableCheckConnection) {
1988 return;
1989 }
1990- var oldEnable = switcher.enableCheckConnection;
1991- switcher.enableCheckConnection = false;
1992-
1993- switcher.checked = menu.checked;
1994-
1995- switcher.enableCheckConnection = oldEnable;
1996+ var oldEnable = enableCheckConnection;
1997+ enableCheckConnection = false;
1998+
1999+ menu.checked = checked;
2000+ menu.triggered(menu.checked);
2001+
2002+ enableCheckConnection = oldEnable;
2003+ }
2004+
2005+ Connections {
2006+ target: menu
2007+ onCheckedChanged: {
2008+ if (!switcher.enableCheckConnection) {
2009+ return;
2010+ }
2011+ var oldEnable = switcher.enableCheckConnection;
2012+ switcher.enableCheckConnection = false;
2013+
2014+ switcher.checked = menu.checked;
2015+
2016+ switcher.enableCheckConnection = oldEnable;
2017+ }
2018 }
2019 }
2020 }
2021
2022=== modified file 'Ubuntu/Settings/Menus/TextMessageMenu.qml'
2023--- Ubuntu/Settings/Menus/TextMessageMenu.qml 2013-10-04 12:26:43 +0000
2024+++ Ubuntu/Settings/Menus/TextMessageMenu.qml 2014-09-25 11:35:47 +0000
2025@@ -19,19 +19,18 @@
2026 */
2027
2028 import QtQuick 2.0
2029-import Ubuntu.Components 0.1
2030+import Ubuntu.Components 1.1
2031 import Ubuntu.Settings.Components 0.1 as USC
2032
2033-SimpleTextMessageMenu {
2034+SimpleMessageMenu {
2035 id: menu
2036
2037 property bool replyEnabled: true
2038- property string replyButtonText: "Send"
2039+ property string replyButtonText: i18n.tr("Send")
2040
2041 signal replied(string value)
2042
2043 footer: USC.ActionTextField {
2044- anchors.fill: parent
2045
2046 activateEnabled: menu.replyEnabled
2047 buttonText: menu.replyButtonText
2048
2049=== modified file 'Ubuntu/Settings/Menus/TimeZoneMenu.qml'
2050--- Ubuntu/Settings/Menus/TimeZoneMenu.qml 2013-10-04 10:04:18 +0000
2051+++ Ubuntu/Settings/Menus/TimeZoneMenu.qml 2014-09-25 11:35:47 +0000
2052@@ -17,17 +17,20 @@
2053 */
2054
2055 import QtQuick 2.0
2056-import Ubuntu.Components 0.1
2057-import Ubuntu.Components.ListItems 0.1 as ListItem
2058+import Ubuntu.Components 1.1
2059+import Ubuntu.Components.ListItems 1.0 as ListItem
2060
2061-ListItem.Standard {
2062+StandardMenu {
2063 id: timeZoneMenu
2064
2065 property alias city: timeZoneMenu.text
2066- property alias time: timeLabel.text
2067+ property string time
2068
2069- control: Label {
2070- id: timeLabel
2071- objectName: "timeLabel"
2072+ component: Component {
2073+ Label {
2074+ id: timeLabel
2075+ objectName: "timeLabel"
2076+ text: time
2077+ }
2078 }
2079 }
2080
2081=== modified file 'Ubuntu/Settings/Menus/TransferMenu.qml'
2082--- Ubuntu/Settings/Menus/TransferMenu.qml 2014-07-04 17:27:20 +0000
2083+++ Ubuntu/Settings/Menus/TransferMenu.qml 2014-09-25 11:35:47 +0000
2084@@ -14,10 +14,11 @@
2085 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2086 */
2087
2088-import QtQuick 2.0
2089-import Ubuntu.Components 0.1
2090-import Ubuntu.Components.ListItems 0.1 as ListItem
2091+import QtQuick 2.1
2092 import QtQuick.Layouts 1.1
2093+import Ubuntu.Components 1.1
2094+import Ubuntu.Components.ListItems 1.0 as ListItem
2095+import Ubuntu.Settings.Components 0.1
2096
2097 ListItem.Empty {
2098 id: menu
2099@@ -30,7 +31,7 @@
2100
2101 property alias maximum: progressBar.maximumValue
2102
2103- implicitHeight: row.height + units.gu(2)
2104+ __height: row.height + units.gu(2)
2105
2106 RowLayout {
2107 id: row
2108@@ -41,21 +42,23 @@
2109 leftMargin: menu.__contentsMargins
2110 rightMargin: menu.__contentsMargins
2111 }
2112-
2113- UbuntuShape {
2114- id: imageShape
2115- Layout.preferredWidth: units.gu(5)
2116- Layout.preferredHeight: units.gu(5)
2117-
2118- Layout.alignment: Qt.AlignTop
2119-
2120- image: Image {
2121+ spacing: units.gu(2)
2122+
2123+ UbuntuShapeForItem {
2124+ Layout.preferredWidth: units.gu(6)
2125+ Layout.preferredHeight: units.gu(6)
2126+
2127+ image: icon
2128+ Icon {
2129+ id: icon
2130 objectName: "icon"
2131- id: icon
2132+ anchors.fill: parent
2133
2134- sourceSize {
2135- width: units.gu(5)
2136- height: units.gu(5)
2137+ color: {
2138+ if (String(source).match(/^image:\/\/theme/)) {
2139+ return Theme.palette.selected.backgroundText;
2140+ }
2141+ return Qt.rgba(0.0, 0.0, 0.0, 0.0);
2142 }
2143 }
2144 }
2145@@ -70,6 +73,7 @@
2146
2147 elide: Text.ElideRight
2148 maximumLineCount: 1
2149+ font.weight: Font.DemiBold
2150 }
2151
2152 ProgressBar {
2153@@ -77,8 +81,9 @@
2154 objectName: "progress"
2155 visible: menu.active
2156 value: 0.0
2157+ showProgressPercentage: false
2158
2159- Layout.preferredHeight: units.gu(2)
2160+ Layout.preferredHeight: units.gu(1)
2161 Layout.fillWidth: true
2162 }
2163
2164@@ -88,6 +93,7 @@
2165 Layout.fillWidth: true
2166 visible: menu.active
2167
2168+ fontSize: "x-small"
2169 elide: Text.ElideRight
2170 maximumLineCount: 1
2171 }
2172
2173=== modified file 'Ubuntu/Settings/Menus/UserSessionMenu.qml'
2174--- Ubuntu/Settings/Menus/UserSessionMenu.qml 2013-10-04 10:04:18 +0000
2175+++ Ubuntu/Settings/Menus/UserSessionMenu.qml 2014-09-25 11:35:47 +0000
2176@@ -17,29 +17,38 @@
2177 */
2178
2179 import QtQuick 2.0
2180-import Ubuntu.Components 0.1
2181-import Ubuntu.Components.ListItems 0.1 as ListItem
2182+import Ubuntu.Components 1.1
2183+import Ubuntu.Components.ListItems 1.0 as ListItem
2184
2185-ListItem.Standard {
2186+StandardMenu {
2187 id: userSessionMenu
2188
2189 property alias name: userSessionMenu.text
2190- property alias active: activeIcon.visible
2191-
2192- control: Rectangle {
2193- id: activeIcon
2194- objectName: "activeIcon"
2195- width: checkMark.width + units.gu(1.5)
2196- height: checkMark.height + units.gu(1.5)
2197- radius: width / 2
2198- antialiasing: true
2199- color: Theme.palette.normal.backgroundText
2200- visible: false
2201-
2202- Image {
2203- id: checkMark
2204- source: "artwork/CheckMark.png"
2205- anchors.centerIn: parent
2206+ property bool active: false
2207+
2208+ component: Component {
2209+ Rectangle {
2210+ id: activeIcon
2211+ objectName: "activeIcon"
2212+ width: checkMark.width + units.gu(1.5)
2213+ height: checkMark.height + units.gu(1.5)
2214+ radius: width / 2
2215+ antialiasing: true
2216+ color: Theme.palette.normal.backgroundText
2217+ visible: userSessionMenu.active
2218+
2219+ Image {
2220+ id: checkMark
2221+ source: "image://theme/tick"
2222+ height: units.gu(2)
2223+ width: height
2224+ anchors.centerIn: parent
2225+
2226+ sourceSize {
2227+ height: height
2228+ width: width
2229+ }
2230+ }
2231 }
2232 }
2233 }
2234
2235=== removed directory 'Ubuntu/Settings/Menus/artwork'
2236=== removed file 'Ubuntu/Settings/Menus/artwork/CMakeLists.txt'
2237--- Ubuntu/Settings/Menus/artwork/CMakeLists.txt 2014-06-27 09:35:26 +0000
2238+++ Ubuntu/Settings/Menus/artwork/CMakeLists.txt 1970-01-01 00:00:00 +0000
2239@@ -1,2 +0,0 @@
2240-# export the artwork files.
2241-export_qmlfiles(Ubuntu.Settings.Menus.Art Ubuntu/Settings/Menus/artwork DESTINATION ${QT_IMPORTS_DIR})
2242
2243=== removed file 'Ubuntu/Settings/Menus/artwork/CheckMark@18.png'
2244Binary files Ubuntu/Settings/Menus/artwork/CheckMark@18.png 2013-09-25 08:54:58 +0000 and Ubuntu/Settings/Menus/artwork/CheckMark@18.png 1970-01-01 00:00:00 +0000 differ
2245=== removed file 'Ubuntu/Settings/Menus/artwork/default_app.svg'
2246--- Ubuntu/Settings/Menus/artwork/default_app.svg 2013-10-04 09:48:04 +0000
2247+++ Ubuntu/Settings/Menus/artwork/default_app.svg 1970-01-01 00:00:00 +0000
2248@@ -1,42 +0,0 @@
2249-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2250-<!-- Created with Inkscape (http://www.inkscape.org/) -->
2251-<svg id="svg15137" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
2252- <defs id="defs15139">
2253- <radialGradient id="radialGradient2612" gradientUnits="userSpaceOnUse" cy="4.625" cx="62.625" gradientTransform="matrix(1 0 0 .34118 0 3.0471)" r="10.625">
2254- <stop id="stop8840" offset="0"/>
2255- <stop id="stop8842" style="stop-opacity:0" offset="1"/>
2256- </radialGradient>
2257- <linearGradient id="linearGradient15133" y2=".24326" gradientUnits="userSpaceOnUse" x2="62.2" gradientTransform="matrix(2.1499 0 0 2.1499 -110.12 31.935)" y1="-12.489" x1="62.2">
2258- <stop id="stop4875" style="stop-color:#fff" offset="0"/>
2259- <stop id="stop4877" style="stop-color:#fff;stop-opacity:0" offset="1"/>
2260- </linearGradient>
2261- <radialGradient id="radialGradient15127" gradientUnits="userSpaceOnUse" cy="-8.7256" cx="62.2" gradientTransform="matrix(2.4129 0 0 2.413 -126.48 34.231)" r="9.7553">
2262- <stop id="stop8649" style="stop-color:#8fb1dc" offset="0"/>
2263- <stop id="stop8651" style="stop-color:#3465a4" offset="1"/>
2264- </radialGradient>
2265- <radialGradient id="radialGradient2418" gradientUnits="userSpaceOnUse" cy="24.149" cx="17.814" gradientTransform="matrix(-2.644 0 2.9365e-8 2.5344 78.725 -37.986)" r="9.125">
2266- <stop id="stop4847" style="stop-color:#fff" offset="0"/>
2267- <stop id="stop4849" style="stop-color:#b6b6b6" offset="1"/>
2268- </radialGradient>
2269- <radialGradient id="radialGradient5145" gradientUnits="userSpaceOnUse" cy="13.067" cx="23.86" gradientTransform="matrix(-1.5425 0 0 -.84553 60.718 23.829)" r="18.098">
2270- <stop id="stop14112" style="stop-color:#557695" offset="0"/>
2271- <stop id="stop14114" style="stop-color:#15395c" offset="1"/>
2272- </radialGradient>
2273- <radialGradient id="radialGradient5147" gradientUnits="userSpaceOnUse" cy="-3.442" cx="62.225" gradientTransform="matrix(1.1035 0 0 1.0265 -4.1555 -1.8158)" r="10.081">
2274- <stop id="stop14118" style="stop-color:#9e9e9e" offset="0"/>
2275- <stop id="stop14120" style="stop-color:#9e9e9e;stop-opacity:0" offset="1"/>
2276- </radialGradient>
2277- </defs>
2278- <g id="layer1">
2279- <path id="path8836" style="opacity:.4;fill-rule:evenodd;fill:url(#radialGradient2612)" d="m73.25 4.625a10.625 3.625 0 1 1 -21.25 0 10.625 3.625 0 1 1 21.25 0z" transform="matrix(2.1647 0 0 2.5637 -111.56 26.85)"/>
2280- <g id="g15122" transform="translate(.79042 -.78563)">
2281- <path id="path6495" style="stroke:#204a87;fill:url(#radialGradient15127)" d="m43.505 24.387c0 10.99-8.9091 19.899-19.897 19.899-10.989 0-19.898-8.9091-19.898-19.899 0-10.989 8.9086-19.897 19.898-19.897 10.988 0 19.897 8.9081 19.897 19.897z"/>
2282- <path id="path6534" style="stroke:url(#radialGradient5147);stroke-width:1.1035;fill:url(#radialGradient5145)" d="m23.726 5.3141c-1.5283 0.12067-3.0328 0.36544-4.4919 0.84567-1.23 0.48843 0.88689-0.42988-0.37486-0.60468-0.75942-0.12994-1.0776 0.65251-1.7561 0.67046-0.7741 0.023841-1.3048 0.71572-2.0319 0.79898-0.26187 1.4432-0.59924-0.56894-0.83949 0.13173 0.19047 0.7212-0.07796 1.1928-0.63582 1.6119-0.60156 0.68249-0.03584 1.2934 0.54212 0.69395 0.2775-0.83446 1.1825-1.7618 2.0655-1.2049 0.8837 0.48448 1.7582 1.6525 2.4938 0.40935-0.75488-0.090735-1.0462-0.73637-1.4079-1.2096-0.40023 0.031761-2.0794-0.32019-1.0059-0.24024 0.5284-0.17249 1.549-0.68558 1.9239-0.66537-0.94013 0.49026 0.35015 0.81268 0.73202 1.2035 0.68671 0.20357 0.99776 1.0757 0.37414 1.527-0.80181 0.4162 0.05573 1.1017 0.221 1.6748 0.12828 0.99827 0.99623 0.43282 1.2716-0.18046 0.39803-1.1153 1.6733-1.0767 2.5958-1.5522 1.008-0.51754 1.0248-0.53575 1.5034 0.20195 0.36764 0.21151 1.5947-0.55825 0.78901-0.929-0.68957 0.03713-1.142 0.46029-0.56364-0.60801 0.13915-0.57404 0.6791-1.3235 0.58092-1.7937-0.662-0.2603-1.324-0.5207-1.986-0.7811zm-9.3732 3.6945c0.35612 0.3643 1.5564 1.0234 1.4368 0.11255-0.14419-0.61744-1.0418-0.62308-1.4368-0.11255zm18.165-0.44471c-0.82412 0.16922-1.6412 0.35467-2.292 0.92363 0.19457 0.7853-0.8341 0.89786-1.2851 1.3281-0.12036 0.25242-0.02467 1.8403 0.51105 1.1573 0.58162-0.77246 0.83368 0.40868 1.4478 0.52687 0.4451-0.14324 0.5002-1.1438 0.33275-1.6043 0.28525-0.46984 0.75058-1.1195 1.3539-1.0659-0.37419 0.57099-0.80163 2.0315 0.3911 1.4345 0.34518-0.006-0.93958 0.75452-1.0166 1.273-0.48258 0.51284-0.9934 0.90587-1.6905 0.50847-0.33355-0.28162-0.50305-1.0992-0.71414-0.17566 0.43341 0.73252-1.089 0.04718-1.0514 1.0356-0.31972 0.61514-0.89623 0.8671-1.563 0.91149 0.24198 0.19141 1.1924 1.3314 0.24953 1.1701-0.60352 0.06628-1.4857 0.40701-1.2414 1.1653-0.27486 0.9444 0.4249 0.70654 0.85522 1.2977 0.70116-0.19916 1.1488-0.62908 1.2634-1.3621 0.65618-0.19273 0.73557-0.93195 1.456-0.91702 0.7182-0.40381 0.88559 0.73738 1.5587 0.82181 0.07058 0.4087-0.33464 1.281 0.45659 0.4693 0.76441-0.55387-0.79512-1.2716-0.30963-1.4066 0.69099 0.22071 0.94006 0.87671 1.051 1.519 0.56306 0.9634 0.70185 0.44404 0.74672-0.40362 0.87723-0.39439 1.1473 1.641 2.3881 1.1397 0.92678 0.19174 0.59949 0.8304-0.01904 1.2203-0.50066 0.47112-1.3382 0.17338-1.9265-0.01558-0.56472-0.27756-1.3196-0.24813-1.6214 0.38347-0.46529-0.21764-0.94642-0.91135-1.4178-1.3118-1.1647-0.5139-2.4314-0.07571-3.5919 0.23946-0.99563 1.1632-2.1949 2.219-2.6236 3.7359-0.62778 0.63853 0.54336 1.0082-0.24392 1.556-0.6428 0.51279 0.10805 1.1629 0.2458 1.7527 0.60445 0.74395 1.6306 3.0723 2.5708 2.1452 0.52705-0.80245 0.81963 0.61582 1.4399-0.30194 0.4952-0.39949 0.9695 0.45802 1.6897 0.14331 0.69372 0.4284 0.56095 1.0433 0.27484 1.6928 0.15583 0.54087 0.93098 0.9344 0.62978 1.6677-0.27366 0.68309 0.58312 1.201 0.41038 1.7987-0.5748 1.1512-0.43928 2.5747 0.09386 3.7157 0.42668 1.0325 0.67699 2.1484 0.64366 3.2692 0.74277 0.2222 1.1367-0.72912 1.8776-0.51313 0.72333 0.09324 0.99191-0.82974 1.5008-1.2158 0.56704-0.46747-0.07223-1.1873 0.82794-1.5185 0.87331-0.42523-1.106-1.0213 0.0152-1.4024 0.46515-0.51761 1.4132-0.69776 1.6008-1.3735-0.33834-1.0398-0.21797-2.1801-0.16738-3.2436 0.32552-0.84167 0.72975-1.6312 1.4262-2.2272 0.28082-0.92669 0.94924-1.7777 0.88942-2.7709-1.6476 0.50399-1.1482-0.21491-0.22962-0.87318 0.63508-0.42199 1.4051-0.84564 1.7006-1.5617 0.14435-0.81048-0.45227-2.1297-1.0079-0.90496-0.24511-0.4707-1.1542-0.71744-1.113-1.3307-0.17659-1.2625 0.34462-0.14427 0.86051 0.10789 1.1146-0.60521 1.6818 1.7766 2.3893 0.35503-0.618-4.471-3.052-8.528-6.34-11.567-0.571-1.0949-0.921 0.75-1.501 0.68-0.464-0.485-1.33-1.1394-0.122-0.914 1.034-0.3028 0.333-0.7027-0.425-0.6842-0.574-0.0697-1.101-0.2706-1.635-0.4789zm-20.56 0.4447c-0.275 1.3534-2.0109 1.1954-2.6162 2.5304-2.9783 3.153-4.8166 7.302-5.32 11.598 0.26584 1.0071 1.1105 1.4908 1.9601 1.9373 0.72184 0.41932 1.7801 0.2342 2.1848 1.1124 0.45187 0.36983 0.93948 1.0997 1.5856 0.87722 0.93664-0.09099 0.36019 0.85823 0.19973 1.3392-0.059277 0.607-0.80778 0.99372-0.52016 1.5778-0.24136 0.66166-0.43304 1.3177 0.10262 1.8906 0.45551 0.83988 0.82632 1.7478 1.6708 2.2751 0.59217 0.49728 1.2625 1.1553 1.0304 1.9974-0.12338 0.68167 0.04306 1.3099 0.3725 1.908-0.11816 0.67146-0.36073 1.3584-0.4105 2.0183 0.87949 0.62206 2.6705 2.0606 2.8031 0.49489 0.50176-0.45161 0.5321-1.1784 1.3743-1.1804 0.3909-0.47777 0.52549-1.2283 0.81706-1.8117-0.42572-0.5384 0.16631-1.3697 0.8046-1.3477 0.81594 0.06128 0.78593-0.89448 1.1111-1.4232-0.0073-0.77224-0.38892-1.6471 0.30542-2.227 0.52242-0.47344 0.46827-1.1675 0.5498-1.8097-1.171-0.7244-2.712-1.0911-3.6386-2.0687-0.18364-0.76504-0.7598-1.0229-1.4925-1.0784-0.30936-0.43256-0.25697-1.4628-0.79753-1.5131-0.69628 0.13369-1.3857 0.24089-1.8917-0.3644-0.573-0.776-1.069 0.2-1.593 0.546-0.492 0.856-1.8683-0.043-1.7038-1.007 0.4839-1.334-1.6425 0.148-0.7699-1.425 0.4151-1.715-0.7067-0.396-1.2952-0.011-0.71822 0.0081-0.98953-0.70747-0.86146-1.3625-0.091117-0.78733 0.48283-1.1877 1.0669-1.5822 0.78161 0.12038 0.97989-0.56085 1.5654-0.4722 0.73603-0.03767 1.0049 0.66782 1.4232 1.1357 0.17514-0.66797-0.18345-1.6152 0.55606-1.9879 0.56414-0.42781 1.137-0.84927 1.2721-1.5904 0.13304-0.77598 1.2893-0.46761 1.4837-1.2526 0.26877-0.8206 1.5114-0.15823 1.7899-0.96804 0.8733-0.82086-0.27242-0.57178-0.89854-0.59806-1.2353 0.12695 0.1228-0.32763 0.58598-0.58155 0.68608 0.09073 1.3195-0.13384 1.9499-0.37629 0.08445 0.85843 0.24597 1.3112 0.68417 0.30788-0.85421-0.20211-0.11618-1.0402-0.95973-1.2614-0.66764 0.04697 0.0066-1.4189-0.81571-1.2577-1.0697 0.70782-0.11401-0.50251-0.9854-0.66347-0.68736-0.74222-0.85436 0.47657-1.2276 0.9183 0.24207 0.84702-0.79095 0.66525-0.97976 1.3606-0.41814 1.2534-0.24143-0.08931-0.74055-0.41035-0.61653-0.24732-1.3592-0.3784-1.3637-1.1899 0.82658-0.60512 2.0667-0.96189 2.5994-1.9148 0.3095-0.74008-0.26215-1.1445-0.96618-1.0889l-0.000005-2e-7zm14.675 1.642c-0.12491 0.65746 0.5475 1.009 0.30788 1.7104-0.21487 0.76842-0.27728 1.3789 0.68289 0.93046 0.99668-0.51183 0.36052-0.90148-0.03867-1.5728-0.27187-0.44613-0.24574-1.275-0.9521-1.0681zm-0.75259 1.0947c-0.79414-0.24012-0.61745 1.4493-0.12164 1.0118 0.7276-0.17916 0.23703-0.5252 0.12164-1.0118zm10.023 8.9969c0.95184 0.84444 1.277 2.0946 1.8858 3.1596 0.90428 0.39972 0.0415 1.0795 0.44521 1.5712 0.84897 0.92228-1.1752 0.24516-0.90606-0.67899-0.1971-1.2139-1.0559-2.044-1.4678-3.1045-0.04294-0.3526-0.38552-0.71788 0.04284-0.94732z"/>
2283- <path id="path8655" style="opacity:.4;stroke:url(#linearGradient15133);fill:none" d="m42.409 24.387c0 10.384-8.4184 18.803-18.801 18.803-10.384 0-18.802-8.4184-18.802-18.803 0-10.384 8.418-18.801 18.802-18.801 10.383 0 18.801 8.4175 18.801 18.801z"/>
2284- </g>
2285- <g id="g2414" transform="matrix(.99991 -.013701 .013701 .99991 -.28870 .53585)">
2286- <path id="path3970" style="stroke-linejoin:round;fill-rule:evenodd;stroke:#666;fill:url(#radialGradient2418)" d="m30.5 20.937 17 16.5-7.75 0.25s3.25 6.75 3.25 6.75c1 3-3.5 4.125-4.25 1.875l-3-6.75-5.5 5.875 0.25-24.5z"/>
2287- <path id="path4853" style="opacity:.4;stroke:#fff;fill:none" d="m31.657 23.379 13.476 13.186-6.9219 0.27746l3.8721 7.7566c0.40273 1.6501-2.0283 2.4126-2.5071 1.1529l-3.6831-7.845-4.4247 4.7083 0.18907-19.236z"/>
2288- </g>
2289- </g>
2290-</svg>
2291
2292=== removed file 'Ubuntu/Settings/Menus/artwork/default_contact.png'
2293Binary files Ubuntu/Settings/Menus/artwork/default_contact.png 2013-10-04 09:48:04 +0000 and Ubuntu/Settings/Menus/artwork/default_contact.png 1970-01-01 00:00:00 +0000 differ
2294=== removed file 'Ubuntu/Settings/Menus/artwork/secure.svg'
2295--- Ubuntu/Settings/Menus/artwork/secure.svg 2013-10-04 09:48:04 +0000
2296+++ Ubuntu/Settings/Menus/artwork/secure.svg 1970-01-01 00:00:00 +0000
2297@@ -1,71 +0,0 @@
2298-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2299-<!-- Created with Inkscape (http://www.inkscape.org/) -->
2300-
2301-<svg
2302- xmlns:dc="http://purl.org/dc/elements/1.1/"
2303- xmlns:cc="http://creativecommons.org/ns#"
2304- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
2305- xmlns:svg="http://www.w3.org/2000/svg"
2306- xmlns="http://www.w3.org/2000/svg"
2307- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
2308- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
2309- width="64"
2310- height="64"
2311- id="svg2986"
2312- version="1.1"
2313- inkscape:version="0.48.4 r9939"
2314- sodipodi:docname="secure.svg">
2315- <defs
2316- id="defs2988" />
2317- <sodipodi:namedview
2318- id="base"
2319- pagecolor="#ffffff"
2320- bordercolor="#666666"
2321- borderopacity="1.0"
2322- inkscape:pageopacity="0.0"
2323- inkscape:pageshadow="2"
2324- inkscape:zoom="7.9180415"
2325- inkscape:cx="7.5048745"
2326- inkscape:cy="29.401628"
2327- inkscape:current-layer="layer1"
2328- showgrid="true"
2329- inkscape:grid-bbox="true"
2330- inkscape:document-units="px"
2331- inkscape:snap-grids="false"
2332- inkscape:window-width="1549"
2333- inkscape:window-height="876"
2334- inkscape:window-x="51"
2335- inkscape:window-y="24"
2336- inkscape:window-maximized="1">
2337- <inkscape:grid
2338- type="xygrid"
2339- id="grid3012"
2340- empspacing="5"
2341- visible="true"
2342- enabled="true"
2343- snapvisiblegridlinesonly="true" />
2344- </sodipodi:namedview>
2345- <metadata
2346- id="metadata2991">
2347- <rdf:RDF>
2348- <cc:Work
2349- rdf:about="">
2350- <dc:format>image/svg+xml</dc:format>
2351- <dc:type
2352- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
2353- <dc:title />
2354- </cc:Work>
2355- </rdf:RDF>
2356- </metadata>
2357- <g
2358- id="layer1"
2359- inkscape:label="Layer 1"
2360- inkscape:groupmode="layer"
2361- transform="translate(0,32)">
2362- <path
2363- inkscape:connector-curvature="0"
2364- d="M 29.999999,-18 C 25.568001,-18 22,-14.432 22,-10 v 6 h -2 c -1.107999,0 -2,0.892 -2,2 v 18 c 0,1.108 0.892001,2 2,2 h 24 c 1.108,0 2,-0.892 2,-2 V -2 c 0,-1.108 -0.892,-2 -2,-2 h -2 v -6 c 0,-4.432 -3.568001,-8 -8.000001,-8 h -4 z m 0,4 h 4 c 2.216,0 4,1.784 4,4 v 6 H 26.000001 v -6 c 0,-2.216 1.784,-4 3.999998,-4 z"
2365- style="fill:#dfdbd2;fill-rule:evenodd"
2366- id="path8" />
2367- </g>
2368-</svg>
2369
2370=== modified file 'Ubuntu/Settings/Menus/qmldir'
2371--- Ubuntu/Settings/Menus/qmldir 2014-07-04 14:06:04 +0000
2372+++ Ubuntu/Settings/Menus/qmldir 2014-09-25 11:35:47 +0000
2373@@ -14,7 +14,7 @@
2374 ProgressValueMenu 0.1 ProgressValueMenu.qml
2375 SectionMenu 0.1 SectionMenu.qml
2376 SeparatorMenu 0.1 SeparatorMenu.qml
2377-SimpleTextMessageMenu 0.1 SimpleTextMessageMenu.qml
2378+SimpleMessageMenu 0.1 SimpleMessageMenu.qml
2379 SliderMenu 0.1 SliderMenu.qml
2380 SnapDecisionMenu 0.1 SnapDecisionMenu.qml
2381 StandardMenu 0.1 StandardMenu.qml
2382@@ -23,5 +23,3 @@
2383 TimeZoneMenu 0.1 TimeZoneMenu.qml
2384 TransferMenu 0.1 TransferMenu.qml
2385 UserSessionMenu 0.1 UserSessionMenu.qml
2386-
2387-internal HeroMessageMenu HeroMessageMenu.qml
2388
2389=== modified file 'debian/changelog'
2390--- debian/changelog 2014-09-18 09:48:33 +0000
2391+++ debian/changelog 2014-09-25 11:35:47 +0000
2392@@ -5,6 +5,14 @@
2393
2394 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 18 Sep 2014 09:48:32 +0000
2395
2396+ubuntu-settings-components (0.4-0ubuntu1) UNRELEASED; urgency=medium
2397+
2398+ [ Nick Dedekind ]
2399+
2400+ * Updated components UI for design review
2401+
2402+ -- Nicholas Dedekind <nicholas.dedekind@gmail.com> Thu, 31 Jul 2014 17:57:51 +0100
2403+
2404 ubuntu-settings-components (0.3+14.10.20140708-0ubuntu1) utopic; urgency=medium
2405
2406 [ Nick Dedekind ]
2407
2408=== modified file 'debian/control'
2409--- debian/control 2014-07-07 15:53:39 +0000
2410+++ debian/control 2014-09-25 11:35:47 +0000
2411@@ -12,7 +12,7 @@
2412 qtdeclarative5-dev-tools,
2413 qtdeclarative5-qtquick2-plugin,
2414 qtdeclarative5-test-plugin,
2415- qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
2416+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1),
2417 suru-icon-theme,
2418 Standards-Version: 3.9.4
2419 Homepage: https://launchpad.net/ubuntu-settings-components
2420@@ -26,7 +26,7 @@
2421 Multi-Arch: same
2422 Pre-Depends: dpkg (>= 1.15.6~)
2423 Depends: qml-module-qtquick-layouts,
2424- qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
2425+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1),
2426 suru-icon-theme,
2427 ${misc:Depends},
2428 ${shlibs:Depends},
2429
2430=== added directory 'examples'
2431=== added file 'examples/CMakeLists.txt'
2432--- examples/CMakeLists.txt 1970-01-01 00:00:00 +0000
2433+++ examples/CMakeLists.txt 2014-09-25 11:35:47 +0000
2434@@ -0,0 +1,2 @@
2435+file(GLOB QML_JS_FILES *.qml *.js)
2436+add_custom_target( ExampleQmlFiles SOURCES ${QML_JS_FILES} )
2437
2438=== added file 'examples/MessageComponents.qml'
2439--- examples/MessageComponents.qml 1970-01-01 00:00:00 +0000
2440+++ examples/MessageComponents.qml 2014-09-25 11:35:47 +0000
2441@@ -0,0 +1,119 @@
2442+/*
2443+ * Copyright 2014 Canonical Ltd.
2444+ *
2445+ * This program is free software; you can redistribute it and/or modify
2446+ * it under the terms of the GNU Lesser General Public License as published by
2447+ * the Free Software Foundation; version 3.
2448+ *
2449+ * This program is distributed in the hope that it will be useful,
2450+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2451+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2452+ * GNU Lesser General Public License for more details.
2453+ *
2454+ * You should have received a copy of the GNU Lesser General Public License
2455+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2456+ *
2457+ * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
2458+ */
2459+
2460+import QtQuick 2.0
2461+import Ubuntu.Components 1.1
2462+import Ubuntu.Settings.Components 0.1
2463+import Ubuntu.Settings.Menus 0.1
2464+
2465+Item {
2466+ property string title: "MessageComponents"
2467+
2468+ width: units.gu(42)
2469+ height: units.gu(75)
2470+
2471+ ListModel {
2472+ id: model
2473+ ListElement {
2474+ type: "text"
2475+ title: "Text Message"
2476+ body: "I am a little teacup, short and stout. Here is my handle, and here is my spout. Who are you talking about my spout?! This should be truncated"
2477+ time: "Sat 31 Oct, 11:00"
2478+ icon: "image://theme/message"
2479+ avatar: "image://theme/contact"
2480+ }
2481+ ListElement {
2482+ type: "simple"
2483+ title: "Simple Text Message Simple"
2484+ body: "I happen to be tall and thin! But let's try a new line"
2485+ time: "Yesterday, 10:00"
2486+ icon: "image://theme/message"
2487+ avatar: "artwork/beach.jpg"
2488+ }
2489+ ListElement {
2490+ type: "snap"
2491+ title: "Snap Decision"
2492+ body: "My mother says I'm handsome!"
2493+ time: "10:30am"
2494+ icon: "image://theme/missed-call"
2495+ avatar: "artwork/night.jpg"
2496+ }
2497+ }
2498+
2499+ ListView {
2500+ model: model
2501+ anchors.fill: parent
2502+
2503+ cacheBuffer: 10000
2504+
2505+ delegate: Loader {
2506+ anchors {
2507+ left: parent.left
2508+ right: parent.right
2509+ }
2510+ asynchronous: true
2511+ sourceComponent: model.type === "simple" ? simple :
2512+ model.type === "text" ? text :
2513+ model.type === "snap" ? snap : undefined
2514+
2515+ Component {
2516+ id: simple
2517+ SimpleMessageMenu {
2518+ avatar: model.avatar
2519+ icon: model.icon
2520+ title: model.title
2521+ body: model.body
2522+ time: model.time
2523+ removable: true
2524+ }
2525+ }
2526+
2527+ Component {
2528+ id: text
2529+ TextMessageMenu {
2530+ avatar: model.avatar
2531+ icon: model.icon
2532+ title: model.title
2533+ body: model.body
2534+ time: model.time
2535+ removable: true
2536+
2537+ onTriggered: {
2538+ selected = !selected;
2539+ }
2540+ }
2541+ }
2542+
2543+ Component {
2544+ id: snap
2545+ SnapDecisionMenu {
2546+ avatar: model.avatar
2547+ icon: model.icon
2548+ title: model.title
2549+ body: model.body
2550+ time: model.time
2551+ removable: true
2552+
2553+ onTriggered: {
2554+ selected = !selected;
2555+ }
2556+ }
2557+ }
2558+ }
2559+ }
2560+}
2561
2562=== added file 'examples/OtherComponents.qml'
2563--- examples/OtherComponents.qml 1970-01-01 00:00:00 +0000
2564+++ examples/OtherComponents.qml 2014-09-25 11:35:47 +0000
2565@@ -0,0 +1,237 @@
2566+/*
2567+ * Copyright 2013 Canonical Ltd.
2568+ *
2569+ * This program is free software; you can redistribute it and/or modify
2570+ * it under the terms of the GNU Lesser General Public License as published by
2571+ * the Free Software Foundation; version 3.
2572+ *
2573+ * This program is distributed in the hope that it will be useful,
2574+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2575+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2576+ * GNU Lesser General Public License for more details.
2577+ *
2578+ * You should have received a copy of the GNU Lesser General Public License
2579+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2580+ *
2581+ * Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
2582+ */
2583+
2584+import QtQuick 2.0
2585+import Ubuntu.Components 1.1
2586+import Ubuntu.Settings.Components 0.1
2587+import Ubuntu.Settings.Menus 0.1
2588+
2589+Item {
2590+ property string title: "Settings Components"
2591+
2592+ ListModel {
2593+ id: mediaPlayerModel
2594+ ListElement { song: "You're The First, The Last, My Everything"; artist: "Barry White"; album: "Hot Soul"; albumArt: "artwork/beach.jpg"}
2595+ ListElement { song: "Stony Ground"; artist: "Richard Thompson"; album: "Electric"; albumArt: "artwork/farm.jpg"}
2596+ ListElement { song: "Los Robots"; artist: "Kraftwerk"; album: "The Man-Machine"; albumArt: "artwork/insane.jpg"}
2597+ }
2598+
2599+ ListModel {
2600+ id: timeZoneModel
2601+ ListElement { city: "San Francisco"; time: "3:00am" }
2602+ ListElement { city: "London"; time: "11:00am" }
2603+ ListElement { city: "Rome"; time: "12:00am" }
2604+ }
2605+
2606+ ListModel {
2607+ id: eventModel
2608+ ListElement { icon: "image://theme/calendar"; eventColor: "yellow"; text: "Lunch with Lola"; time: "1:10 PM" }
2609+ ListElement { icon: "image://theme/calendar"; eventColor: "green"; text: "Gym"; time: "6:30 PM" }
2610+ ListElement { icon: "image://theme/calendar"; eventColor: "red"; text: "Birthday Party"; time: "9:00 PM" }
2611+ }
2612+
2613+ Flickable {
2614+ id: flickable
2615+
2616+ anchors.fill: parent
2617+ contentWidth: column.width
2618+ contentHeight: column.height
2619+
2620+ Column {
2621+ id: column
2622+
2623+ width: flickable.width
2624+ height: childrenRect.height
2625+
2626+ StandardMenu {
2627+ text: i18n.tr("Standard Menu\nLook at me, I'm a new line.")
2628+ }
2629+
2630+ StandardMenu {
2631+ iconSource: "image://theme/calendar"
2632+ iconColor: "red"
2633+ text: i18n.tr("Standard Menu")
2634+ component: Component {
2635+ Button {
2636+ text: "Press Me"
2637+ }
2638+ }
2639+ backColor: Qt.rgba(1,1,1,0.1)
2640+ }
2641+
2642+ SliderMenu {
2643+ id: slider
2644+ text: i18n.tr("Slider")
2645+ minimumValue: 0
2646+ maximumValue: 100
2647+ value: 20
2648+
2649+ minIcon: "image://theme/audio-volume-low"
2650+ maxIcon: "image://theme/audio-volume-high"
2651+ }
2652+
2653+ ProgressBarMenu {
2654+ text: i18n.tr("ProgressBar")
2655+ value: slider.value
2656+ minimumValue: 0
2657+ maximumValue: 100
2658+ }
2659+
2660+ ProgressValueMenu {
2661+ text: i18n.tr("ProgressValue")
2662+ value: slider.value
2663+ }
2664+
2665+ ButtonMenu {
2666+ text: i18n.tr("Button")
2667+ buttonText: i18n.tr("Hello world!")
2668+ }
2669+
2670+ CheckableMenu {
2671+ text: i18n.tr("Checkable")
2672+ checked: true
2673+ }
2674+
2675+ SwitchMenu {
2676+ text: i18n.tr("Switch")
2677+ checked: true
2678+ }
2679+
2680+ SectionMenu {
2681+ text: i18n.tr("Section Starts Here")
2682+ busy: true
2683+ }
2684+
2685+ SeparatorMenu {}
2686+
2687+ CalendarMenu {
2688+ id: calendar
2689+ }
2690+
2691+ UserSessionMenu {
2692+ name: i18n.tr("Lola Chang")
2693+ iconSource: "image://theme/contact"
2694+ active: true
2695+ }
2696+
2697+ MediaPlayerMenu {
2698+ id: mediaPlayer
2699+ property int index: 0
2700+
2701+ playerName: "Rhythmbox"
2702+ playerIcon: Qt.resolvedUrl("../tests/artwork/rhythmbox.png")
2703+ albumArt: mediaPlayerModel.get(index).albumArt;
2704+ song: mediaPlayerModel.get(index).song;
2705+ artist: mediaPlayerModel.get(index).artist;
2706+ album: mediaPlayerModel.get(index).album;
2707+ showTrack: mediaControl.playing
2708+ }
2709+
2710+ PlaybackItemMenu {
2711+ id: mediaControl
2712+ canPlay: true
2713+ canGoNext: mediaPlayer.index < mediaPlayerModel.count - 1
2714+ canGoPrevious: mediaPlayer.index > 0
2715+ playing: false
2716+
2717+ onPrevious: mediaPlayer.index = Math.max(mediaPlayer.index - 1, 0)
2718+ onNext: mediaPlayer.index = Math.min(mediaPlayer.index + 1, mediaPlayerModel.count - 1)
2719+ onPlay: { playing = !playing; }
2720+ }
2721+
2722+ AccessPointMenu {
2723+ active: true
2724+ secure: true
2725+ adHoc: false
2726+ signalStrength: 50
2727+ text: "Access Point"
2728+
2729+ onTriggered: active = !active
2730+ }
2731+
2732+ GroupedMessageMenu {
2733+ text: "Group Message"
2734+ count: "4100"
2735+ }
2736+
2737+ Column {
2738+ anchors {
2739+ left: parent.left
2740+ right: parent.right
2741+ }
2742+
2743+ Repeater {
2744+ model: timeZoneModel
2745+
2746+ TimeZoneMenu {
2747+ city: model.city
2748+ time: model.time
2749+ }
2750+ }
2751+ }
2752+
2753+ Column {
2754+ anchors {
2755+ left: parent.left
2756+ right: parent.right
2757+ }
2758+
2759+ Repeater {
2760+ model: eventModel
2761+
2762+ EventMenu {
2763+ iconSource: model.icon
2764+ text: model.text
2765+ eventColor: model.eventColor
2766+ time: model.time
2767+ enabled: false
2768+ }
2769+ }
2770+ }
2771+
2772+ Row {
2773+ anchors {
2774+ left: parent.left
2775+ right: parent.right
2776+ }
2777+
2778+ spacing: units.gu(1)
2779+
2780+ Label {
2781+ text: "StatusIcon"
2782+ anchors.verticalCenter: parent.verticalCenter
2783+ }
2784+
2785+ StatusIcon {
2786+ height: units.gu(5)
2787+ source: "image://theme/gps"
2788+ }
2789+
2790+ StatusIcon {
2791+ height: units.gu(5)
2792+ source: "image://theme/battery-caution"
2793+ }
2794+
2795+ StatusIcon {
2796+ height: units.gu(5)
2797+ source: "image://theme/missing,gpm-battery-000-charging"
2798+ }
2799+ }
2800+ }
2801+ }
2802+}
2803
2804=== renamed file 'SettingsComponents.qml' => 'examples/SettingsComponents.qml'
2805--- SettingsComponents.qml 2014-07-04 14:07:50 +0000
2806+++ examples/SettingsComponents.qml 2014-09-25 11:35:47 +0000
2807@@ -17,275 +17,50 @@
2808 */
2809
2810 import QtQuick 2.0
2811-import Ubuntu.Components 0.1
2812+import Ubuntu.Components 1.1
2813 import Ubuntu.Settings.Components 0.1
2814 import Ubuntu.Settings.Menus 0.1
2815
2816 MainView {
2817+ id: mainView
2818 // Note! applicationName needs to match the .desktop filename
2819 applicationName: "SettingsComponents"
2820
2821 width: units.gu(42)
2822 height: units.gu(75)
2823
2824- ListModel {
2825- id: mediaPlayerModel
2826- ListElement { song: "Mine"; artist: "Taylor Swift"; album: "Speak Now"; albumArt: "tests/artwork/speak-now.jpg"}
2827- ListElement { song: "Stony Ground"; artist: "Richard Thompson"; album: "Electric"; albumArt: "tests/artwork/electric.jpg"}
2828- ListElement { song: "Los Robots"; artist: "Kraftwerk"; album: "The Man-Machine"; albumArt: "tests/artwork/the-man-machine.jpg"}
2829- }
2830-
2831- ListModel {
2832- id: timeZoneModel
2833- ListElement { city: "San Francisco"; time: "3:00am" }
2834- ListElement { city: "London"; time: "11:00am" }
2835- ListElement { city: "Rome"; time: "12:00am" }
2836- }
2837-
2838- ListModel {
2839- id: eventModel
2840- ListElement { icon: "image://theme/calendar"; eventColor: "yellow"; text: "Lunch with Lola"; time: "1:10 PM" }
2841- ListElement { icon: "image://theme/calendar"; eventColor: "green"; text: "Gym"; time: "6:30 PM" }
2842- ListElement { icon: "image://theme/calendar"; eventColor: "red"; text: "Birthday Party"; time: "9:00 PM" }
2843+ Component.onCompleted: {
2844+ Theme.name = "Ubuntu.Components.Themes.SuruGradient"
2845+ }
2846+
2847+ ListModel {
2848+ id: pages
2849+ ListElement { source: "OtherComponents.qml" }
2850+ ListElement { source: "MessageComponents.qml" }
2851+ ListElement { source: "TransferComponents.qml" }
2852 }
2853
2854 Page {
2855- title: "SettingsComponents"
2856-
2857- Flickable {
2858- id: flickable
2859-
2860+ title: listView.currentItem ? listView.currentItem.item.title : "Components"
2861+ clip: true
2862+
2863+ ListView {
2864+ id: listView
2865+ model: pages
2866 anchors.fill: parent
2867- contentWidth: column.width
2868- contentHeight: column.height
2869-
2870- Column {
2871- id: column
2872-
2873- width: flickable.width
2874- height: childrenRect.height
2875-
2876- StandardMenu {
2877- text: i18n.tr("Standard Menu\nLook at me, I'm a new line.")
2878- }
2879-
2880- StandardMenu {
2881- iconSource: "image://theme/calendar"
2882- iconColor: "red"
2883- text: i18n.tr("Standard Menu")
2884- component: Component {
2885- Button {
2886- text: "Press Me"
2887- }
2888- }
2889- }
2890-
2891-
2892- SliderMenu {
2893- id: slider
2894- text: i18n.tr("Slider")
2895- minimumValue: 0
2896- maximumValue: 100
2897- value: 20
2898-
2899- minIcon: "image://theme/audio-volume-low"
2900- maxIcon: "image://theme/audio-volume-high"
2901- }
2902-
2903- ProgressBarMenu {
2904- text: i18n.tr("ProgressBar")
2905- value: slider.value
2906- minimumValue: 0
2907- maximumValue: 100
2908- }
2909-
2910- ProgressValueMenu {
2911- text: i18n.tr("ProgressValue")
2912- value: slider.value
2913- }
2914-
2915- ButtonMenu {
2916- text: i18n.tr("Button")
2917- buttonText: i18n.tr("Hello world!")
2918- }
2919-
2920- CheckableMenu {
2921- text: i18n.tr("Checkable")
2922- checked: true
2923- }
2924-
2925- SwitchMenu {
2926- text: i18n.tr("Switch")
2927- checked: true
2928- }
2929-
2930- SectionMenu {
2931- text: i18n.tr("Section Starts Here")
2932- busy: true
2933- }
2934-
2935- SeparatorMenu {}
2936-
2937- CalendarMenu {
2938- id: calendar
2939- }
2940-
2941- UserSessionMenu {
2942- name: i18n.tr("Lola Chang")
2943- iconSource: Qt.resolvedUrl("tests/artwork/avatar.png")
2944- active: true
2945- }
2946-
2947- MediaPlayerMenu {
2948- id: mediaPlayer
2949- property int index: 0
2950-
2951- playerName: "Rhythmbox"
2952- playerIcon: Qt.resolvedUrl("tests/artwork/rhythmbox.png")
2953- song: mediaPlayerModel.get(index).song;
2954- artist: mediaPlayerModel.get(index).artist;
2955- album: mediaPlayerModel.get(index).album;
2956- albumArt: mediaPlayerModel.get(index).albumArt;
2957- }
2958-
2959- PlaybackItemMenu {
2960- canPlay: true
2961- canGoNext: true
2962- canGoPrevious: true
2963- playing: mediaPlayer.running
2964-
2965- onPrevious: mediaPlayer.index = Math.max(mediaPlayer.index - 1, 0)
2966- onNext: mediaPlayer.index = Math.min(mediaPlayer.index + 1, mediaPlayerModel.count - 1)
2967- onPlay: { mediaPlayer.running = !mediaPlayer.running; }
2968- }
2969-
2970- TransferMenu {
2971- text: "Video Downloading"
2972- stateText: "3 minutes remaning"
2973- iconSource: "tests/artwork/speak-now.jpg"
2974- progress: 0.6
2975- active: true
2976- removable: true
2977- confirmRemoval: true
2978- }
2979-
2980- TransferMenu {
2981- text: "Video Downloading"
2982- iconSource: "tests/artwork/speak-now.jpg"
2983- progress: 0.6
2984- active: false
2985- removable: true
2986- confirmRemoval: true
2987- }
2988-
2989- AccessPointMenu {
2990- checked: true
2991- secure: true
2992- adHoc: false
2993- signalStrength: 50
2994- text: "Access Point"
2995- }
2996-
2997- GroupedMessageMenu {
2998- text: "Group Message"
2999- count: "4"
3000- }
3001-
3002- SnapDecisionMenu {
3003- title: "Snap Decision"
3004- time: "10:30am"
3005- message: "My mother says I'm handsome!"
3006-
3007- replyMessages: ["Yeah right", "Sure she did"]
3008-
3009- onTriggered: {
3010- selected = !selected;
3011- }
3012- }
3013-
3014- SimpleTextMessageMenu {
3015- title: "Simple Text Message"
3016- time: "11am"
3017- message: "I am a little teacup"
3018-
3019- onTriggered: {
3020- selected = !selected;
3021- }
3022- }
3023-
3024- TextMessageMenu {
3025- title: "Text Message"
3026- time: "11am"
3027- message: "I happen to be tall and thin!"
3028-
3029- onTriggered: {
3030- selected = !selected;
3031- }
3032- }
3033-
3034- Column {
3035- anchors {
3036- left: parent.left
3037- right: parent.right
3038- }
3039-
3040- Repeater {
3041- model: timeZoneModel
3042-
3043- TimeZoneMenu {
3044- city: model.city
3045- time: model.time
3046- }
3047- }
3048- }
3049-
3050- Column {
3051- anchors {
3052- left: parent.left
3053- right: parent.right
3054- }
3055-
3056- Repeater {
3057- model: eventModel
3058-
3059- EventMenu {
3060- iconSource: model.icon
3061- text: model.text
3062- eventColor: model.eventColor
3063- time: model.time
3064- }
3065- }
3066- }
3067-
3068- Row {
3069- anchors {
3070- left: parent.left
3071- right: parent.right
3072- }
3073-
3074- spacing: units.gu(1)
3075-
3076- Label {
3077- text: "StatusIcon"
3078- anchors.verticalCenter: parent.verticalCenter
3079- }
3080-
3081- StatusIcon {
3082- height: units.gu(5)
3083- source: "image://theme/gps"
3084- }
3085-
3086- StatusIcon {
3087- height: units.gu(5)
3088- source: "image://theme/battery-caution"
3089- }
3090-
3091- StatusIcon {
3092- height: units.gu(5)
3093- source: "image://theme/missing,gpm-battery-000-charging"
3094- }
3095- }
3096+
3097+ orientation: ListView.Horizontal
3098+ snapMode: ListView.SnapOneItem
3099+ highlightRangeMode: ListView.StrictlyEnforceRange
3100+ boundsBehavior: Flickable.StopAtBounds
3101+
3102+ delegate: Loader {
3103+ width: ListView.view.width
3104+ height: ListView.view.height
3105+
3106+ source: model.source
3107 }
3108 }
3109+
3110 }
3111 }
3112
3113=== added file 'examples/TransferComponents.qml'
3114--- examples/TransferComponents.qml 1970-01-01 00:00:00 +0000
3115+++ examples/TransferComponents.qml 2014-09-25 11:35:47 +0000
3116@@ -0,0 +1,84 @@
3117+/*
3118+* Copyright 2014 Canonical Ltd.
3119+*
3120+* This program is free software; you can redistribute it and/or modify
3121+* it under the terms of the GNU Lesser General Public License as published by
3122+* the Free Software Foundation; version 3.
3123+*
3124+* This program is distributed in the hope that it will be useful,
3125+* but WITHOUT ANY WARRANTY; without even the implied warranty of
3126+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3127+* GNU Lesser General Public License for more details.
3128+*
3129+* You should have received a copy of the GNU Lesser General Public License
3130+* along with this program. If not, see <http://www.gnu.org/licenses/>.
3131+*
3132+* Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
3133+*/
3134+
3135+import QtQuick 2.0
3136+import Ubuntu.Components 1.1
3137+import Ubuntu.Settings.Components 0.1
3138+import Ubuntu.Settings.Menus 0.1
3139+
3140+Item {
3141+ property string title: "Transfer Components"
3142+
3143+ width: units.gu(42)
3144+ height: units.gu(75)
3145+
3146+ ListModel {
3147+ id: model
3148+ ListElement {
3149+ text: "File name here"
3150+ state: "Starting…"
3151+ progress: 0
3152+ image: "image://theme/video-x-generic-symbolic"
3153+ active: true
3154+ }
3155+ ListElement {
3156+ text: "proposition.pdf"
3157+ state: "10 seconds remaining"
3158+ progress: 0.7
3159+ image: "../tests/artwork/the-man-machine.jpg"
3160+ active: true
3161+ }
3162+ ListElement {
3163+ text: "electric.jpg"
3164+ state: "Failed, tap to retry"
3165+ progress: 1.0
3166+ image: "../tests/artwork/electric.jpg"
3167+ active: true
3168+ }
3169+ ListElement {
3170+ text: "clubbing-friday.jpg.jpg"
3171+ state: "no state"
3172+ progress: 0.4
3173+ image: "../tests/artwork/speak-now.jpg"
3174+ active: false
3175+ }
3176+ }
3177+
3178+ ListView {
3179+ model: model
3180+ anchors.fill: parent
3181+
3182+ cacheBuffer: 10000
3183+
3184+ delegate: Loader {
3185+ anchors {
3186+ left: parent.left
3187+ right: parent.right
3188+ }
3189+ asynchronous: true
3190+
3191+ sourceComponent: TransferMenu {
3192+ text: model.text
3193+ stateText: model.state
3194+ progress: model.progress
3195+ iconSource: model.image
3196+ active: model.active
3197+ }
3198+ }
3199+ }
3200+}
3201
3202=== added directory 'examples/artwork'
3203=== added file 'examples/artwork/beach.jpg'
3204Binary files examples/artwork/beach.jpg 1970-01-01 00:00:00 +0000 and examples/artwork/beach.jpg 2014-09-25 11:35:47 +0000 differ
3205=== added file 'examples/artwork/farm.jpg'
3206Binary files examples/artwork/farm.jpg 1970-01-01 00:00:00 +0000 and examples/artwork/farm.jpg 2014-09-25 11:35:47 +0000 differ
3207=== added file 'examples/artwork/insane.jpg'
3208Binary files examples/artwork/insane.jpg 1970-01-01 00:00:00 +0000 and examples/artwork/insane.jpg 2014-09-25 11:35:47 +0000 differ
3209=== added file 'examples/artwork/night.jpg'
3210Binary files examples/artwork/night.jpg 1970-01-01 00:00:00 +0000 and examples/artwork/night.jpg 2014-09-25 11:35:47 +0000 differ
3211=== modified file 'runtests.sh'
3212--- runtests.sh 2013-10-04 10:52:27 +0000
3213+++ runtests.sh 2014-09-25 11:35:47 +0000
3214@@ -26,10 +26,10 @@
3215 # floating point operations and xml writing is natively supported.
3216
3217
3218-if test -e SettingsComponents.qml; then
3219+if test -e runtests.sh; then
3220 echo In-source build detected.
3221 SRCDIR=`pwd`
3222-elif test -e ../SettingsComponents.qml; then
3223+elif test -e ../runtests.sh; then
3224 echo Out-of-source build detected. Found source dir at ..
3225 SRCDIR=`pwd`/..
3226 else
3227
3228=== modified file 'tests/qmltests/CMakeLists.txt'
3229--- tests/qmltests/CMakeLists.txt 2014-07-04 14:07:50 +0000
3230+++ tests/qmltests/CMakeLists.txt 2014-09-25 11:35:47 +0000
3231@@ -3,7 +3,7 @@
3232
3233 set(qmltest_DEFAULT_TARGETS qmluitests)
3234 set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
3235-set(qmltest_DEFAULT_PROPERTIES "")
3236+set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")
3237
3238 set(qmltest_DEFAULT_IMPORT_PATHS
3239 ${CMAKE_BINARY_DIR}
3240@@ -24,7 +24,7 @@
3241 add_qml_test(Menus ProgressBarMenu)
3242 add_qml_test(Menus ProgressValueMenu)
3243 add_qml_test(Menus SectionMenu)
3244-add_qml_test(Menus SimpleTextMessageMenu)
3245+add_qml_test(Menus SimpleMessageMenu)
3246 add_qml_test(Menus SliderMenu)
3247 add_qml_test(Menus SnapDecisionMenu)
3248 add_qml_test(Menus SwitchMenu)
3249@@ -32,3 +32,4 @@
3250 add_qml_test(Menus TextMessageMenu)
3251 add_qml_test(Menus TimeZoneMenu)
3252 add_qml_test(Menus TransferMenu)
3253+
3254
3255=== modified file 'tests/qmltests/Menus/tst_AccessPointMenu.qml'
3256--- tests/qmltests/Menus/tst_AccessPointMenu.qml 2014-08-07 15:14:07 +0000
3257+++ tests/qmltests/Menus/tst_AccessPointMenu.qml 2014-09-25 11:35:47 +0000
3258@@ -46,7 +46,7 @@
3259 id: accessPoint2
3260 anchors.top: accessPoint.bottom
3261
3262- checked: true
3263+ active: true
3264 secure: true
3265 adHoc: true
3266 signalStrength: 50
3267@@ -66,7 +66,7 @@
3268 when: windowShown
3269
3270 function init() {
3271- accessPoint.checked = false;
3272+ accessPoint.active = false;
3273 accessPoint.secure = false;
3274 accessPoint.adHoc = false;
3275 accessPoint.signalStrength = 0;
3276@@ -74,7 +74,7 @@
3277 }
3278
3279 function test_activate() {
3280- mouseClick(accessPoint, accessPoint.width / 2, accessPoint.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3281+ mouseClick(accessPoint, accessPoint.width / 2, accessPoint.height / 2);
3282 compare(signalSpyTriggered.count > 0, true, "activate signal should have been triggered");
3283 }
3284
3285@@ -123,23 +123,5 @@
3286 accessPoint.secure = false;
3287 compare(icon.visible, false, "Secure icon should not be visible when access point is not secure");
3288 }
3289-
3290- function test_checkBox(data) {
3291- var checkBox = findChild(accessPoint, "checkBox");
3292- verify(checkBox !== undefined);
3293-
3294- accessPoint.checked = true;
3295- compare(checkBox.checked, true, "Checkbox should be checked when access point is checked");
3296-
3297- accessPoint.checked = false;
3298- compare(checkBox.checked, false, "Checkbox should not be checked when access point is not checked");
3299- }
3300-
3301- function test_checkBox_on_default_checked() {
3302- var checkBox = findChild(accessPoint2, "checkBox");
3303- verify(checkBox !== undefined);
3304-
3305- compare(checkBox.checked, true, "Check box should be checked if default to checked")
3306- }
3307 }
3308 }
3309
3310=== modified file 'tests/qmltests/Menus/tst_ButtonMenu.qml'
3311--- tests/qmltests/Menus/tst_ButtonMenu.qml 2014-08-07 15:14:07 +0000
3312+++ tests/qmltests/Menus/tst_ButtonMenu.qml 2014-09-25 11:35:47 +0000
3313@@ -69,7 +69,7 @@
3314 var button2 = findChild(buttonMenu2, "button");
3315 verify(button !== undefined);
3316
3317- mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3318+ mouseClick(button, button.width / 2, button.height / 2);
3319 compare(signalSpy.count > 0, true, "signal clicked not triggered");
3320 }
3321 }
3322
3323=== modified file 'tests/qmltests/Menus/tst_CheckableMenu.qml'
3324--- tests/qmltests/Menus/tst_CheckableMenu.qml 2014-08-07 15:14:07 +0000
3325+++ tests/qmltests/Menus/tst_CheckableMenu.qml 2014-09-25 11:35:47 +0000
3326@@ -73,12 +73,12 @@
3327 var checkbox = findChild(checkMenu, "checkbox");
3328 verify(checkbox !== undefined);
3329
3330- mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3331+ mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2);
3332 compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkbox click");
3333 }
3334
3335 function test_clickCheckMenu() {
3336- mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3337+ mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2);
3338 compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkMenu click");
3339 }
3340 }
3341
3342=== modified file 'tests/qmltests/Menus/tst_EventMenu.qml'
3343--- tests/qmltests/Menus/tst_EventMenu.qml 2014-08-07 15:14:07 +0000
3344+++ tests/qmltests/Menus/tst_EventMenu.qml 2014-09-25 11:35:47 +0000
3345@@ -73,7 +73,7 @@
3346 }
3347
3348 function test_triggered() {
3349- mouseClick(eventMenu, eventMenu.width / 2, eventMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3350+ mouseClick(eventMenu, eventMenu.width / 2, eventMenu.height / 2);
3351 compare(signalSpyTriggered.count > 0, true, "should have been triggered");
3352 }
3353 }
3354
3355=== modified file 'tests/qmltests/Menus/tst_GroupedMessageMenu.qml'
3356--- tests/qmltests/Menus/tst_GroupedMessageMenu.qml 2014-08-07 15:14:07 +0000
3357+++ tests/qmltests/Menus/tst_GroupedMessageMenu.qml 2014-09-25 11:35:47 +0000
3358@@ -79,7 +79,7 @@
3359 }
3360
3361 function test_triggered() {
3362- mouseClick(messageMenu, messageMenu.width / 2, messageMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3363+ mouseClick(messageMenu, messageMenu.width / 2, messageMenu.height / 2);
3364 compare(signalSpyTriggered.count > 0, true, "should have been triggered");
3365 }
3366
3367
3368=== modified file 'tests/qmltests/Menus/tst_MediaPlayerMenu.qml'
3369--- tests/qmltests/Menus/tst_MediaPlayerMenu.qml 2014-08-07 15:14:07 +0000
3370+++ tests/qmltests/Menus/tst_MediaPlayerMenu.qml 2014-09-25 11:35:47 +0000
3371@@ -52,16 +52,16 @@
3372 var player = findChild(mediaPlayerMenu, "player");
3373 var albumArt = findChild(mediaPlayerMenu, "albumArt");
3374
3375- var running = mediaPlayerMenu.running
3376-
3377- compare(player.visible, !running, "player should be not visible when running");
3378- compare(albumArt.visible, running, "albumn art should be visible when running");
3379-
3380- running = !running;
3381- mediaPlayerMenu.running = running;
3382-
3383- compare(player.visible, !running, "player should be not visible when running");
3384- compare(albumArt.visible, running, "albumn art should be visible when running");
3385+ var showTrack = mediaPlayerMenu.showTrack
3386+
3387+ compare(player.visible, !showTrack, "player should be not visible when running");
3388+ compare(albumArt.visible, showTrack, "albumn art should be visible when running");
3389+
3390+ showTrack = !showTrack;
3391+ mediaPlayerMenu.showTrack = showTrack;
3392+
3393+ compare(player.visible, !showTrack, "player should be not visible when running");
3394+ compare(albumArt.visible, showTrack, "albumn art should be visible when running");
3395 }
3396 }
3397 }
3398
3399=== modified file 'tests/qmltests/Menus/tst_PlaybackItemMenu.qml'
3400--- tests/qmltests/Menus/tst_PlaybackItemMenu.qml 2014-08-07 15:14:07 +0000
3401+++ tests/qmltests/Menus/tst_PlaybackItemMenu.qml 2014-09-25 11:35:47 +0000
3402@@ -94,7 +94,7 @@
3403 playbackItem[data.enableProp] = data.enableValue;
3404
3405 var button = findChild(playbackItem, data.objectName);
3406- mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3407+ mouseClick(button, button.width / 2, button.height / 2);
3408
3409 compare(data.signalSpy.count > 0, data.enableValue, data.enableValue ? "signal should be triggered" : "signal should not be triggered");
3410 }
3411
3412=== renamed file 'tests/qmltests/Menus/tst_SimpleTextMessageMenu.qml' => 'tests/qmltests/Menus/tst_SimpleMessageMenu.qml'
3413--- tests/qmltests/Menus/tst_SimpleTextMessageMenu.qml 2014-08-07 15:14:07 +0000
3414+++ tests/qmltests/Menus/tst_SimpleMessageMenu.qml 2014-09-25 11:35:47 +0000
3415@@ -38,22 +38,22 @@
3416 width: flickable.width
3417 height: childrenRect.height
3418
3419- SimpleTextMessageMenu {
3420+ SimpleMessageMenu {
3421 id: messageMenu
3422 removable: false
3423
3424 title: "Text Message"
3425+ body: "I am a little teapot"
3426 time: "11:08am"
3427- message: "I am a little teapot"
3428 }
3429
3430- SimpleTextMessageMenu {
3431+ SimpleMessageMenu {
3432 id: messageMenuRemovable
3433 removable: true
3434 anchors.top: messageMenu.bottom
3435 }
3436
3437- TextMessageMenu {
3438+ SimpleMessageMenu {
3439 id: messageMenuSelected
3440 removable: true
3441 anchors.top: messageMenuRemovable.bottom
3442@@ -62,8 +62,8 @@
3443 }
3444
3445 SignalSpy {
3446- id: signalSpyActivateApp
3447- signalName: "appActivated"
3448+ id: signalSpyIconActivated
3449+ signalName: "iconActivated"
3450 target: messageMenuSelected
3451 }
3452
3453@@ -78,7 +78,7 @@
3454 when: windowShown
3455
3456 function init() {
3457- signalSpyActivateApp.clear();
3458+ signalSpyIconActivated.clear();
3459 signalSpyDismiss.clear();
3460 messageMenuSelected.selected = false;
3461 }
3462@@ -108,54 +108,61 @@
3463 function test_time(data) {
3464 messageMenu.time = data.time;
3465
3466- var subtitle = findChild(messageMenu, "subtitle");
3467- verify(subtitle !== undefined, "No subtitle");
3468- compare(subtitle.text, data.time, "Time does not match set time.");
3469- }
3470-
3471- function test_appIcon_data() {
3472- return [
3473- { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") },
3474- { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3475- ];
3476- }
3477-
3478- function test_appIcon(data) {
3479- messageMenu.appIcon = data.appIcon;
3480-
3481- var appIcon = findChild(messageMenu, "appIcon");
3482- verify(appIcon !== undefined, "No app icon");
3483- compare(appIcon.source, data.appIcon, "App Icon does not match set icon.");
3484- }
3485-
3486- function test_message_data() {
3487- return [
3488- { message: "This is a test." },
3489- { message: "Test is also a test." },
3490- ];
3491- }
3492-
3493- function test_message(data) {
3494- messageMenu.message = data.message;
3495+ var time = findChild(messageMenu, "time");
3496+ verify(time !== undefined, "No time");
3497+ compare(time.text, data.time, "Time does not match set time.");
3498+ }
3499+
3500+ function test_avatar_data() {
3501+ return [
3502+ { avatar: Qt.resolvedUrl("../../artwork/avatar.png") },
3503+ { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3504+ ];
3505+ }
3506+
3507+ function test_avatar(data) {
3508+ messageMenu.avatar = data.avatar;
3509+
3510+ var avatar = findChild(messageMenu, "avatar");
3511+ verify(avatar !== undefined, "No avatar");
3512+ compare(avatar.source, data.avatar, "Avatar does not match set avatar.");
3513+ }
3514+
3515+ function test_icon_data() {
3516+ return [
3517+ { icon: Qt.resolvedUrl("../../artwork/avatar.png") },
3518+ { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3519+ ];
3520+ }
3521+
3522+ function test_icon(data) {
3523+ messageMenu.icon = data.icon;
3524+
3525+ var icon = findChild(messageMenu, "icon");
3526+ verify(icon !== undefined, "No icon");
3527+ compare(icon.source, data.icon, "Icon does not match set icon.");
3528+ }
3529+
3530+ function test_body_data() {
3531+ return [
3532+ { body: "This is a test." },
3533+ { body: "Test is also a test." },
3534+ ];
3535+ }
3536+
3537+ function test_body(data) {
3538+ messageMenu.body = data.body;
3539
3540 var body = findChild(messageMenu, "body");
3541 verify(body !== undefined, "No body");
3542- compare(body.text, data.message, "Message does not match set message.");
3543+ compare(body.text, data.body, "Message does not match set message.");
3544 }
3545
3546- function test_activateApp() {
3547- var appIcon = findChild(messageMenuSelected, "appIcon");
3548-
3549- mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3550- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered");
3551-
3552- messageMenuSelected.selected = false;
3553- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3554- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected");
3555-
3556- messageMenuSelected.selected = true;
3557- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3558- compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected");
3559+ function test_iconActivated() {
3560+ var icon = findChild(messageMenuSelected, "icon");
3561+
3562+ mouseClick(icon, icon.width / 2, icon.height / 2);
3563+ compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered");
3564 }
3565
3566 function test_dismiss() {
3567
3568=== modified file 'tests/qmltests/Menus/tst_SnapDecisionMenu.qml'
3569--- tests/qmltests/Menus/tst_SnapDecisionMenu.qml 2014-08-07 15:14:07 +0000
3570+++ tests/qmltests/Menus/tst_SnapDecisionMenu.qml 2014-09-25 11:35:47 +0000
3571@@ -43,14 +43,16 @@
3572 removable: false
3573
3574 title: "Text Message"
3575+ body: "I am a little teapot"
3576 time: "11:08am"
3577- message: "I am a little teapot"
3578+ _animationDuration: 0
3579 }
3580
3581 SnapDecisionMenu {
3582 id: messageMenuRemovable
3583 removable: true
3584 anchors.top: messageMenu.bottom
3585+ _animationDuration: 0
3586 }
3587
3588 SnapDecisionMenu {
3589@@ -58,6 +60,7 @@
3590 removable: true
3591 selected: true
3592 anchors.top: messageMenuRemovable.bottom
3593+ _animationDuration: 0
3594
3595 onReplied: {
3596 textMessageReply = value;
3597@@ -69,8 +72,8 @@
3598 property string textMessageReply: ""
3599
3600 SignalSpy {
3601- id: signalSpyActivateApp
3602- signalName: "appActivated"
3603+ id: signalSpyIconActivated
3604+ signalName: "iconActivated"
3605 target: messageMenuSelected
3606 }
3607
3608@@ -81,8 +84,8 @@
3609 }
3610
3611 SignalSpy {
3612- id: signalSpyActivate
3613- signalName: "activated"
3614+ id: signalSpyActionActivated
3615+ signalName: "actionActivated"
3616 target: messageMenuSelected
3617 }
3618
3619@@ -97,9 +100,9 @@
3620 when: windowShown
3621
3622 function init() {
3623- signalSpyActivateApp.clear();
3624+ signalSpyIconActivated.clear();
3625 signalSpyDismiss.clear();
3626- signalSpyActivate.clear();
3627+ signalSpyActionActivated.clear();
3628 signalSpyReply.clear();
3629 textMessageReply = "";
3630
3631@@ -132,39 +135,71 @@
3632 function test_time(data) {
3633 messageMenu.time = data.time;
3634
3635+ var subtitle = findChild(messageMenu, "time");
3636+ verify(subtitle !== undefined, "No time");
3637+ compare(subtitle.text, data.time, "Time does not match set time.");
3638+ }
3639+
3640+ function test_avatar_data() {
3641+ return [
3642+ { avatar: Qt.resolvedUrl("../../artwork/avatar.png") },
3643+ { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3644+ ];
3645+ }
3646+
3647+ function test_avatar(data) {
3648+ messageMenu.avatar = data.avatar;
3649+
3650+ var avatar = findChild(messageMenu, "avatar");
3651+ verify(avatar !== undefined, "No avatar");
3652+ compare(avatar.source, data.avatar, "Avatar does not match set avatar.");
3653+ }
3654+
3655+ function test_icon_data() {
3656+ return [
3657+ { icon: Qt.resolvedUrl("../../artwork/avatar.png") },
3658+ { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3659+ ];
3660+ }
3661+
3662+ function test_icon(data) {
3663+ messageMenu.icon = data.icon;
3664+
3665+ var icon = findChild(messageMenu, "icon");
3666+ verify(icon !== undefined, "No icon");
3667+ compare(icon.source, data.icon, "Icon does not match set icon.");
3668+ }
3669+
3670+ function test_body_data() {
3671+ return [
3672+ { body: "This is a test." },
3673+ { body: "Test is also a test." },
3674+ ];
3675+ }
3676+
3677+ function test_body(data) {
3678+ messageMenu.body = data.body;
3679+
3680 var body = findChild(messageMenu, "body");
3681 verify(body !== undefined, "No body");
3682- compare(body.text, data.time, "Time does not match set time.");
3683- }
3684-
3685- function test_appIcon_data() {
3686- return [
3687- { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") },
3688- { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3689- ];
3690- }
3691-
3692- function test_appIcon(data) {
3693- messageMenu.appIcon = data.appIcon;
3694-
3695- var appIcon = findChild(messageMenu, "appIcon");
3696- verify(appIcon !== undefined, "No app icon");
3697- compare(appIcon.source, data.appIcon, "App Icon does not match set icon.");
3698- }
3699-
3700- function test_message_data() {
3701- return [
3702- { message: "This is a test." },
3703- { message: "Test is also a test." },
3704- ];
3705- }
3706-
3707- function test_message(data) {
3708- messageMenu.message = data.message;
3709-
3710- var subtitle = findChild(messageMenu, "subtitle");
3711- verify(subtitle !== undefined, "No subtitle");
3712- compare(subtitle.text, data.message, "Message does not match set message.");
3713+ compare(body.text, data.body, "Message does not match set message.");
3714+ }
3715+
3716+ function test_iconActivated() {
3717+ var icon = findChild(messageMenuSelected, "icon");
3718+
3719+ mouseClick(icon, icon.width / 2, icon.height / 2);
3720+ compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered");
3721+ }
3722+
3723+ function test_dismiss() {
3724+ mouseFlick(messageMenuRemovable,
3725+ messageMenuRemovable.width / 2,
3726+ messageMenuRemovable.height / 2,
3727+ messageMenuRemovable.width,
3728+ messageMenuRemovable.height / 2,
3729+ true, true, units.gu(1), 10);
3730+ tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3731 }
3732
3733 function test_replyButtonText_data() {
3734@@ -182,52 +217,27 @@
3735 compare(button.text, data.buttonText, "Button text does not match set text.");
3736 }
3737
3738- function test_activateApp() {
3739- var appIcon = findChild(messageMenuSelected, "appIcon");
3740-
3741- mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3742- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered");
3743-
3744- messageMenuSelected.selected = false;
3745- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3746- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected");
3747-
3748- messageMenuSelected.selected = true;
3749- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3750- compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected");
3751- }
3752-
3753- function test_dismiss() {
3754- mouseFlick(messageMenuRemovable,
3755- messageMenuRemovable.width / 2,
3756- messageMenuRemovable.height / 2,
3757- messageMenuRemovable.width,
3758- messageMenuRemovable.height / 2,
3759- true, true, units.gu(1), 10);
3760- tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
3761- }
3762-
3763 function test_activateEnabled() {
3764 messageMenuSelected.selected = true;
3765- messageMenuSelected.activateEnabled = false;
3766+ messageMenuSelected.actionEnabled = false;
3767
3768 var actionButton = findChild(messageMenuSelected, "actionButton");
3769 verify(actionButton !== undefined, "Action button not found");
3770
3771 compare(actionButton.enabled, false, "Action button should not be enabled when activateEnabled=false");
3772- messageMenuSelected.activateEnabled = true
3773+ messageMenuSelected.actionEnabled = true
3774 compare(actionButton.enabled, true, "Action button should be enabled when activateEnabled=true");
3775 }
3776
3777- function test_activate() {
3778+ function test_actionActivated() {
3779 messageMenuSelected.selected = true;
3780- messageMenuSelected.activateEnabled = true;
3781+ messageMenuSelected.actionEnabled = true;
3782
3783 var actionButton = findChild(messageMenuSelected, "actionButton");
3784 verify(actionButton !== undefined, "Action button not found");
3785
3786- mouseClick(actionButton, actionButton.width / 2, actionButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3787- compare(signalSpyActivate.count > 0, true);
3788+ mouseClick(actionButton, actionButton.width / 2, actionButton.height / 2);
3789+ compare(signalSpyActionActivated.count > 0, true);
3790 }
3791
3792 function test_replyEnabled_data() {
3793@@ -249,7 +259,7 @@
3794
3795 var messageButton = findChild(messageMenuSelected, "messageButton");
3796 verify(messageButton !== undefined, "Message button not found");
3797- mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300);
3798+ mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2);
3799
3800 var sendButton = findChild(messageMenuSelected, "sendButton");
3801 verify(sendButton !== undefined, "Send button not found");
3802@@ -267,12 +277,12 @@
3803
3804 var messageButton = findChild(messageMenuSelected, "messageButton");
3805 verify(messageButton !== undefined, "Message button not found");
3806- mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300);
3807+ mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2);
3808
3809 var sendButton = findChild(messageMenuSelected, "sendButton");
3810 verify(sendButton !== undefined, "Send button not found");
3811
3812- mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3813+ mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2);
3814 compare(signalSpyReply.count > 0, true);
3815 compare(textMessageReply, "reply1", "Text message did not reply with correct text.");
3816 }
3817@@ -284,28 +294,5 @@
3818 { tag: 'reply3', index: 2, expected: "reply3" }
3819 ]
3820 }
3821-
3822- function test_reply_with_message(data) {
3823- messageMenuSelected.selected = true;
3824- messageMenu.replyEnabled = true;
3825- messageMenuSelected.replyMessages = [ "reply1", "reply2", "reply3", "reply4" ];
3826-
3827- var messageButton = findChild(messageMenuSelected, "messageButton");
3828- verify(messageButton !== undefined, "Message button not found");
3829- mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300);
3830-
3831- tryCompareFunction(function() { return messageMenuSelected.implicitHeight == messageMenuSelected.expandedHeight; }, true);
3832-
3833- var replyMessage = findChild(messageMenuSelected, "replyMessage"+data.index);
3834- verify(replyMessage !== undefined, "Reply message not found");
3835- mouseClick(replyMessage, replyMessage.width / 2, replyMessage.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3836-
3837- var sendButton = findChild(messageMenuSelected, "sendButton");
3838- verify(sendButton !== undefined, "Send button not found");
3839-
3840- mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3841- compare(signalSpyReply.count > 0, true);
3842- compare(textMessageReply, data.expected, "Text message did not reply with correct text.");
3843- }
3844 }
3845 }
3846
3847=== modified file 'tests/qmltests/Menus/tst_SwitchMenu.qml'
3848--- tests/qmltests/Menus/tst_SwitchMenu.qml 2014-08-07 15:14:07 +0000
3849+++ tests/qmltests/Menus/tst_SwitchMenu.qml 2014-09-25 11:35:47 +0000
3850@@ -77,12 +77,12 @@
3851
3852 function test_clickSwitchBox() {
3853 var switcher = findChild(switchMenu, "switcher");
3854- mouseClick(switchMenu, switcher.width / 2, switcher.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3855+ mouseClick(switchMenu, switcher.width / 2, switcher.height / 2);
3856 compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switcher click");
3857 }
3858
3859 function test_clickSwitchMenu() {
3860- mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
3861+ mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2);
3862 compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switchMenu click");
3863 }
3864 }
3865
3866=== modified file 'tests/qmltests/Menus/tst_TextMessageMenu.qml'
3867--- tests/qmltests/Menus/tst_TextMessageMenu.qml 2014-08-07 15:14:07 +0000
3868+++ tests/qmltests/Menus/tst_TextMessageMenu.qml 2014-09-25 11:35:47 +0000
3869@@ -43,20 +43,23 @@
3870 removable: false
3871
3872 title: "Text Message"
3873+ body: "I am a little teapot"
3874 time: "11:08am"
3875- message: "I am a little teapot"
3876+ _animationDuration: 0
3877 }
3878
3879 TextMessageMenu {
3880 id: messageMenuRemovable
3881 removable: true
3882 anchors.top: messageMenu.bottom
3883+ _animationDuration: 0
3884 }
3885
3886 TextMessageMenu {
3887 id: messageMenuSelected
3888 removable: true
3889 anchors.top: messageMenuRemovable.bottom
3890+ _animationDuration: 0
3891
3892 onReplied: {
3893 textMessageReply = value;
3894@@ -68,8 +71,8 @@
3895 property string textMessageReply: ""
3896
3897 SignalSpy {
3898- id: signalSpyActivateApp
3899- signalName: "appActivated"
3900+ id: signalSpyIconActivated
3901+ signalName: "iconActivated"
3902 target: messageMenuSelected
3903 }
3904
3905@@ -90,7 +93,7 @@
3906 when: windowShown
3907
3908 function init() {
3909- signalSpyActivateApp.clear();
3910+ signalSpyIconActivated.clear();
3911 signalSpyDismiss.clear();
3912 signalSpyReply.clear();
3913 textMessageReply = "";
3914@@ -124,39 +127,71 @@
3915 function test_time(data) {
3916 messageMenu.time = data.time;
3917
3918- var subtitle = findChild(messageMenu, "subtitle");
3919- verify(subtitle !== undefined, "No subtitle");
3920+ var subtitle = findChild(messageMenu, "time");
3921+ verify(subtitle !== undefined, "No time");
3922 compare(subtitle.text, data.time, "Time does not match set time.");
3923 }
3924
3925- function test_appIcon_data() {
3926- return [
3927- { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") },
3928- { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3929- ];
3930- }
3931-
3932- function test_appIcon(data) {
3933- messageMenu.appIcon = data.appIcon;
3934-
3935- var appIcon = findChild(messageMenu, "appIcon");
3936- verify(appIcon !== undefined, "No app icon");
3937- compare(appIcon.source, data.appIcon, "App Icon does not match set icon.");
3938- }
3939-
3940- function test_message_data() {
3941- return [
3942- { message: "This is a test." },
3943- { message: "Test is also a test." },
3944- ];
3945- }
3946-
3947- function test_message(data) {
3948- messageMenu.message = data.message;
3949+ function test_avatar_data() {
3950+ return [
3951+ { avatar: Qt.resolvedUrl("../../artwork/avatar.png") },
3952+ { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3953+ ];
3954+ }
3955+
3956+ function test_avatar(data) {
3957+ messageMenu.avatar = data.avatar;
3958+
3959+ var avatar = findChild(messageMenu, "avatar");
3960+ verify(avatar !== undefined, "No avatar");
3961+ compare(avatar.source, data.avatar, "Avatar does not match set avatar.");
3962+ }
3963+
3964+ function test_icon_data() {
3965+ return [
3966+ { icon: Qt.resolvedUrl("../../artwork/avatar.png") },
3967+ { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") },
3968+ ];
3969+ }
3970+
3971+ function test_icon(data) {
3972+ messageMenu.icon = data.icon;
3973+
3974+ var icon = findChild(messageMenu, "icon");
3975+ verify(icon !== undefined, "No icon");
3976+ compare(icon.source, data.icon, "Icon does not match set icon.");
3977+ }
3978+
3979+ function test_body_data() {
3980+ return [
3981+ { body: "This is a test." },
3982+ { body: "Test is also a test." },
3983+ ];
3984+ }
3985+
3986+ function test_body(data) {
3987+ messageMenu.body = data.body;
3988
3989 var body = findChild(messageMenu, "body");
3990 verify(body !== undefined, "No body");
3991- compare(body.text, data.message, "Message does not match set message.");
3992+ compare(body.text, data.body, "Message does not match set message.");
3993+ }
3994+
3995+ function test_iconActivated() {
3996+ var icon = findChild(messageMenuSelected, "icon");
3997+
3998+ mouseClick(icon, icon.width / 2, icon.height / 2);
3999+ compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered");
4000+ }
4001+
4002+ function test_dismiss() {
4003+ mouseFlick(messageMenuRemovable,
4004+ messageMenuRemovable.width / 2,
4005+ messageMenuRemovable.height / 2,
4006+ messageMenuRemovable.width,
4007+ messageMenuRemovable.height / 2,
4008+ true, true, units.gu(1), 10);
4009+ tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
4010 }
4011
4012 function test_replyButtonText_data() {
4013@@ -174,31 +209,6 @@
4014 compare(button.text, data.buttonText, "Button text does not match set text.");
4015 }
4016
4017- function test_activateApp() {
4018- var appIcon = findChild(messageMenuSelected, "appIcon");
4019-
4020- mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
4021- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered");
4022-
4023- messageMenuSelected.selected = false;
4024- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
4025- compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected");
4026-
4027- messageMenuSelected.selected = true;
4028- mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
4029- compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected");
4030- }
4031-
4032- function test_dismiss() {
4033- mouseFlick(messageMenuRemovable,
4034- messageMenuRemovable.width / 2,
4035- messageMenuRemovable.height / 2,
4036- messageMenuRemovable.width,
4037- messageMenuRemovable.height / 2,
4038- true, true, units.gu(1), 10);
4039- tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true);
4040- }
4041-
4042 function test_replyEnabled_data() {
4043 return [
4044 { tag: 'disabledNoReply', enabled: false, reply: "", expected: false},
4045@@ -234,7 +244,7 @@
4046 var sendButton = findChild(messageMenuSelected, "sendButton");
4047 verify(sendButton !== undefined, "Send button not found");
4048
4049- mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0);
4050+ mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2);
4051 compare(signalSpyReply.count > 0, true);
4052 compare(textMessageReply, "reply1", "Text message did not reply with correct text.");
4053 }
4054
4055=== modified file 'tests/utils/modules/Ubuntu/Test/UbuntuTestCase.qml'
4056--- tests/utils/modules/Ubuntu/Test/UbuntuTestCase.qml 2013-10-04 10:10:47 +0000
4057+++ tests/utils/modules/Ubuntu/Test/UbuntuTestCase.qml 2014-09-25 11:35:47 +0000
4058@@ -15,7 +15,7 @@
4059 */
4060
4061 import QtTest 1.0
4062-import Ubuntu.Components 0.1
4063+import Ubuntu.Components 1.1
4064 import Ubuntu.Test 0.1 as UT
4065
4066 TestCase {

Subscribers

People subscribed via source and target branches

to all changes: