Merge lp:~nick-dedekind/ubuntu-settings-components/indicator-polishing into lp:~registry/ubuntu-settings-components/trunk
- indicator-polishing
- Merge into trunk
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 | ||||||||
Related bugs: |
|
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:
|
This proposal supersedes a proposal from 2014-07-29.
Commit message
Description of the change
Visual changes for indicator RTM polishing sprint
https:/
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
* 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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:81
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:85
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:88
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
jenkins failing due to lacking xvfb-run
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:89
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:90
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:91
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrea Cimitan (cimi) wrote : | # |
Do we want to animate expansions of message components?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrea Cimitan (cimi) wrote : | # |
if you can, would be nice to not shorten variable names or ids, like using animation instead ani
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
comments attached.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> Do we want to animate expansions of message components?
Yes. I put this back.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> if you can, would be nice to not shorten variable names or ids, like using
> animation instead ani
fixed.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:92
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrea Cimitan (cimi) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:97
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:98
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:99
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:100
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Zanetti (mzanetti) wrote : | # |
Breaks the indicators.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:103
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:104
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:105
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:107
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Albert Astals Cid (aacid) wrote : | # |
Please add a i18n.tr to
./Ubuntu/
And also who are people translating the strings marked with i18n here? Doesn't seem to be a .pot file :S
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> Please add a i18n.tr to
>
> ./Ubuntu/
> 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.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrea Cimitan (cimi) : | # |
Preview Diff
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 | 96 | enable_testing() | 96 | enable_testing() |
6 | 97 | 97 | ||
7 | 98 | add_subdirectory(Ubuntu) | 98 | add_subdirectory(Ubuntu) |
8 | 99 | add_subdirectory(examples) | ||
9 | 99 | add_subdirectory(tests) | 100 | add_subdirectory(tests) |
10 | 100 | 101 | ||
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 | 19 | */ | 19 | */ |
16 | 20 | 20 | ||
17 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 |
19 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
20 | 23 | import QtQuick.Layouts 1.1 | ||
21 | 23 | 24 | ||
22 | 24 | Item { | 25 | Item { |
23 | 25 | id: textField | 26 | id: textField |
24 | @@ -29,43 +30,44 @@ | |||
25 | 29 | 30 | ||
26 | 30 | signal activated(var value) | 31 | signal activated(var value) |
27 | 31 | 32 | ||
31 | 32 | TextField { | 33 | implicitHeight: layout.implicitHeight |
29 | 33 | id: replyField | ||
30 | 34 | objectName: "replyText" | ||
32 | 35 | 34 | ||
33 | 35 | RowLayout { | ||
34 | 36 | id: layout | ||
35 | 36 | anchors { | 37 | anchors { |
36 | 37 | top: parent.top | ||
37 | 38 | bottom: parent.bottom | ||
38 | 39 | left: parent.left | 38 | left: parent.left |
39 | 40 | right: sendButton.left | ||
40 | 41 | rightMargin: units.gu(1) | ||
41 | 42 | } | ||
42 | 43 | placeholderText: "Reply" | ||
43 | 44 | hasClearButton: false | ||
44 | 45 | |||
45 | 46 | onEnabledChanged: { | ||
46 | 47 | //Make sure that the component lost focus when enabled = false, | ||
47 | 48 | //otherwise it will get focus again when enable = true | ||
48 | 49 | if (!enabled) { | ||
49 | 50 | focus = false; | ||
50 | 51 | } | ||
51 | 52 | } | ||
52 | 53 | } | ||
53 | 54 | |||
54 | 55 | Button { | ||
55 | 56 | id: sendButton | ||
56 | 57 | objectName: "sendButton" | ||
57 | 58 | anchors { | ||
58 | 59 | top: parent.top | ||
59 | 60 | bottom: parent.bottom | ||
60 | 61 | right: parent.right | 39 | right: parent.right |
61 | 62 | } | 40 | } |
68 | 63 | width: units.gu(9) | 41 | spacing: units.gu(1) |
69 | 64 | enabled: replyField.text !== "" && textField.activateEnabled | 42 | |
70 | 65 | color: enabled ? "#c94212" : "#bababa" | 43 | TextField { |
71 | 66 | 44 | id: replyField | |
72 | 67 | onClicked: { | 45 | objectName: "replyText" |
73 | 68 | textField.activated(replyField.text); | 46 | |
74 | 47 | placeholderText: i18n.tr("Reply") | ||
75 | 48 | hasClearButton: false | ||
76 | 49 | |||
77 | 50 | Layout.fillWidth: true | ||
78 | 51 | |||
79 | 52 | onEnabledChanged: { | ||
80 | 53 | //Make sure that the component lost focus when enabled = false, | ||
81 | 54 | //otherwise it will get focus again when enable = true | ||
82 | 55 | if (!enabled) { | ||
83 | 56 | focus = false; | ||
84 | 57 | } | ||
85 | 58 | } | ||
86 | 59 | } | ||
87 | 60 | |||
88 | 61 | Button { | ||
89 | 62 | id: sendButton | ||
90 | 63 | objectName: "sendButton" | ||
91 | 64 | Layout.preferredWidth: units.gu(9) | ||
92 | 65 | enabled: replyField.text !== "" && textField.activateEnabled | ||
93 | 66 | color: UbuntuColors.green | ||
94 | 67 | |||
95 | 68 | onClicked: { | ||
96 | 69 | textField.activated(replyField.text); | ||
97 | 70 | } | ||
98 | 69 | } | 71 | } |
99 | 70 | } | 72 | } |
100 | 71 | } | 73 | } |
101 | 72 | 74 | ||
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 | 1 | add_subdirectory(artwork) | ||
107 | 2 | |||
108 | 3 | add_usc_plugin(Ubuntu.Settings.Components 0.1 Ubuntu/Settings/Components) | 1 | add_usc_plugin(Ubuntu.Settings.Components 0.1 Ubuntu/Settings/Components) |
109 | 4 | 2 | ||
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 | 15 | */ | 15 | */ |
115 | 16 | 16 | ||
116 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
118 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 1.1 |
119 | 19 | import "dateExt.js" as DateExt | 19 | import "dateExt.js" as DateExt |
120 | 20 | 20 | ||
121 | 21 | ListView { | 21 | ListView { |
122 | @@ -204,7 +204,7 @@ | |||
123 | 204 | 204 | ||
124 | 205 | // Styling properties | 205 | // Styling properties |
125 | 206 | property color color: Theme.palette.selected.backgroundText | 206 | property color color: Theme.palette.selected.backgroundText |
127 | 207 | property color todayColor: "#DD4814" | 207 | property color todayColor: Theme.palette.selected.foreground |
128 | 208 | property string fontSize: "large" | 208 | property string fontSize: "large" |
129 | 209 | property var backgroundColor: "transparent" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha) | 209 | property var backgroundColor: "transparent" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha) |
130 | 210 | property var sundayBackgroundColor: "#19AEA79F" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha) | 210 | property var sundayBackgroundColor: "#19AEA79F" // FIXME use color instead var when Qt will fix the bug with the binding (loses alpha) |
131 | 211 | 211 | ||
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 | 1 | /* | ||
137 | 2 | * Copyright 2012 Canonical Ltd. | ||
138 | 3 | * | ||
139 | 4 | * This program is free software; you can redistribute it and/or modify | ||
140 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
141 | 6 | * the Free Software Foundation; version 3. | ||
142 | 7 | * | ||
143 | 8 | * This program is distributed in the hope that it will be useful, | ||
144 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
145 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
146 | 11 | * GNU Lesser General Public License for more details. | ||
147 | 12 | * | ||
148 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
149 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
150 | 15 | */ | ||
151 | 16 | |||
152 | 17 | import QtQuick 2.0 | ||
153 | 18 | import Ubuntu.Components 0.1 | ||
154 | 19 | |||
155 | 20 | Item { | ||
156 | 21 | id: icon | ||
157 | 22 | |||
158 | 23 | property url source | ||
159 | 24 | property alias color: colorizedImage.keyColorOut | ||
160 | 25 | property alias keyColor: colorizedImage.keyColorIn | ||
161 | 26 | property alias status: image.status | ||
162 | 27 | |||
163 | 28 | Image { | ||
164 | 29 | id: image | ||
165 | 30 | |||
166 | 31 | /* Necessary so that icons are not loaded before a size is set. */ | ||
167 | 32 | property bool ready: false | ||
168 | 33 | Component.onCompleted: ready = true | ||
169 | 34 | |||
170 | 35 | anchors.fill: parent | ||
171 | 36 | source: ready && width > 0 && height > 0 && icon.source ? icon.source : "" | ||
172 | 37 | sourceSize { | ||
173 | 38 | width: width | ||
174 | 39 | height: height | ||
175 | 40 | } | ||
176 | 41 | cache: true | ||
177 | 42 | visible: !colorizedImage.active | ||
178 | 43 | } | ||
179 | 44 | |||
180 | 45 | ShaderEffect { | ||
181 | 46 | id: colorizedImage | ||
182 | 47 | |||
183 | 48 | anchors.fill: parent | ||
184 | 49 | visible: active && image.status == Image.Ready | ||
185 | 50 | |||
186 | 51 | // Whether or not a color has been set. | ||
187 | 52 | property bool active: keyColorOut != Qt.rgba(0.0, 0.0, 0.0, 0.0) | ||
188 | 53 | |||
189 | 54 | property Image source: visible ? image : null | ||
190 | 55 | property color keyColorOut: Qt.rgba(0.0, 0.0, 0.0, 0.0) | ||
191 | 56 | property color keyColorIn: "#808080" | ||
192 | 57 | property real threshold: 0.6 | ||
193 | 58 | |||
194 | 59 | fragmentShader: source ? " | ||
195 | 60 | varying highp vec2 qt_TexCoord0; | ||
196 | 61 | uniform sampler2D source; | ||
197 | 62 | uniform highp vec4 keyColorOut; | ||
198 | 63 | uniform highp vec4 keyColorIn; | ||
199 | 64 | uniform lowp float threshold; | ||
200 | 65 | uniform lowp float qt_Opacity; | ||
201 | 66 | void main() { | ||
202 | 67 | lowp vec4 sourceColor = texture2D(source, qt_TexCoord0); | ||
203 | 68 | gl_FragColor = mix(vec4(keyColorOut.rgb, 1.0) * sourceColor.a, sourceColor, step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity; | ||
204 | 69 | }" : "" | ||
205 | 70 | } | ||
206 | 71 | } | ||
207 | 72 | 0 | ||
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 | 18 | * Olivier Tilloy <olivier.tilloy@canonical.com> | 18 | * Olivier Tilloy <olivier.tilloy@canonical.com> |
213 | 19 | */ | 19 | */ |
214 | 20 | 20 | ||
217 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.1 |
218 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
219 | 23 | import QtQuick.Layouts 1.1 | ||
220 | 23 | 24 | ||
221 | 24 | Item { | 25 | Item { |
223 | 25 | id: heroMessageHeader | 26 | id: messageHeader |
224 | 26 | 27 | ||
225 | 27 | property alias avatar: avatarImage.source | 28 | property alias avatar: avatarImage.source |
226 | 28 | property alias icon: iconImage.source | 29 | property alias icon: iconImage.source |
239 | 29 | property alias appIcon: appIconImage.source | 30 | property alias title: titleText.text |
240 | 30 | property alias titleText: __titleText | 31 | property alias time: timeText.text |
241 | 31 | property alias subtitleText: __subtitleText | 32 | property alias body: bodyText.text |
242 | 32 | property alias bodyText: __bodyText | 33 | |
243 | 33 | property real bodyBottom: bodyText.y + bodyText.height | 34 | signal iconClicked() |
244 | 34 | 35 | ||
245 | 35 | signal appIconClicked() | 36 | implicitHeight: layout.height |
246 | 36 | 37 | ||
247 | 37 | height: units.gu(9) | 38 | function shakeIcon() { |
248 | 38 | 39 | shake.restart(); | |
249 | 39 | UbuntuShape { | 40 | } |
250 | 40 | id: avatarImageContainer | 41 | |
251 | 42 | RowLayout { | ||
252 | 43 | id: layout | ||
253 | 41 | anchors { | 44 | anchors { |
254 | 42 | top: parent.top | ||
255 | 43 | topMargin: units.gu(2) | ||
256 | 44 | left: parent.left | 45 | left: parent.left |
374 | 45 | leftMargin: units.gu(2) | 46 | right: parent.right |
375 | 46 | } | 47 | rightMargin: units.gu(4) |
376 | 47 | height: units.gu(6) | 48 | } |
377 | 48 | width: units.gu(6) | 49 | spacing: units.gu(2) |
378 | 49 | image: Image { | 50 | |
379 | 50 | id: avatarImage | 51 | UbuntuShapeForItem { |
380 | 51 | objectName: "avatar" | 52 | Layout.preferredWidth: units.gu(6) |
381 | 52 | fillMode: Image.PreserveAspectFit | 53 | Layout.preferredHeight: units.gu(6) |
382 | 53 | } | 54 | |
383 | 54 | } | 55 | image: avatarImage |
384 | 55 | 56 | Icon { | |
385 | 56 | Image { | 57 | id: avatarImage |
386 | 57 | id: iconImage | 58 | objectName: "avatar" |
387 | 58 | objectName: "icon" | 59 | anchors.fill: parent |
388 | 59 | anchors { | 60 | |
389 | 60 | top: parent.top | 61 | color: { |
390 | 61 | topMargin: units.gu(2) | 62 | if (String(source).match(/^image:\/\/theme/)) { |
391 | 62 | left: avatarImageContainer.right | 63 | return Theme.palette.selected.backgroundText; |
392 | 63 | leftMargin: units.gu(1) | 64 | } |
393 | 64 | } | 65 | return Qt.rgba(0.0, 0.0, 0.0, 0.0); |
394 | 65 | width: units.gu(2) | 66 | } |
395 | 66 | height: width | 67 | } |
396 | 67 | horizontalAlignment: Image.AlignHCenter | 68 | } |
397 | 68 | verticalAlignment: Image.AlignBottom | 69 | |
398 | 69 | fillMode: Image.PreserveAspectFit | 70 | ColumnLayout { |
399 | 70 | } | 71 | Label { |
400 | 71 | 72 | id: titleText | |
401 | 72 | Label { | 73 | objectName: "title" |
402 | 73 | id: __titleText | 74 | |
403 | 74 | objectName: "title" | 75 | maximumLineCount: 1 |
404 | 75 | anchors { | 76 | elide: Text.ElideRight |
405 | 76 | baseline: iconImage.bottom | 77 | font.weight: Font.DemiBold |
406 | 77 | left: iconImage.right | 78 | fontSize: "medium" |
407 | 78 | leftMargin: units.gu(1) | 79 | |
408 | 79 | right: __appIcon.left | 80 | Layout.fillWidth: true |
409 | 80 | rightMargin: units.gu(2) | 81 | // calculate width with regard to the time's incursion into this layout's space. |
410 | 81 | } | 82 | Layout.maximumWidth: layout.width - timeLayout.width - units.gu(4) |
411 | 82 | elide: Text.ElideRight | 83 | } |
412 | 83 | font.weight: Font.DemiBold | 84 | spacing: units.gu(0.5) |
413 | 84 | fontSize: "medium" | 85 | |
414 | 85 | } | 86 | Label { |
415 | 86 | 87 | id: bodyText | |
416 | 87 | Label { | 88 | objectName: "body" |
417 | 88 | id: __subtitleText | 89 | |
418 | 89 | objectName: "subtitle" | 90 | maximumLineCount: 3 |
419 | 90 | anchors { | 91 | wrapMode: Text.WordWrap |
420 | 91 | baseline: __titleText.baseline | 92 | elide: Text.ElideRight |
421 | 92 | baselineOffset: units.gu(2.5) | 93 | fontSize: "small" |
422 | 93 | left: __titleText.left | 94 | |
423 | 94 | right: __titleText.right | 95 | Layout.fillWidth: true |
424 | 95 | } | 96 | } |
425 | 96 | elide: Text.ElideRight | 97 | } |
426 | 97 | fontSize: "small" | 98 | } |
427 | 98 | } | 99 | |
428 | 99 | 100 | ColumnLayout { | |
429 | 100 | Label { | 101 | id: timeLayout |
430 | 101 | id: __bodyText | 102 | anchors.right: parent.right |
431 | 102 | objectName: "body" | 103 | |
432 | 103 | anchors { | 104 | Label { |
433 | 104 | baseline: __subtitleText.baseline | 105 | id: timeText |
434 | 105 | baselineOffset: units.gu(2.5) | 106 | objectName: "time" |
435 | 106 | left: __titleText.left | 107 | elide: Text.ElideRight |
436 | 107 | right: parent.right | 108 | fontSize: "x-small" |
437 | 108 | rightMargin: units.gu(2) | 109 | maximumLineCount: 1 |
438 | 109 | } | 110 | horizontalAlignment: Text.AlignRight |
439 | 110 | maximumLineCount: 2 | 111 | } |
440 | 111 | wrapMode: Text.WordWrap | 112 | spacing: units.gu(0.5) |
441 | 112 | elide: Text.ElideRight | 113 | |
442 | 113 | fontSize: "small" | 114 | Icon { |
443 | 114 | } | 115 | id: iconImage |
444 | 115 | 116 | objectName: "icon" | |
445 | 116 | Item { | 117 | Layout.preferredHeight: units.gu(3) |
446 | 117 | id: __appIcon | 118 | Layout.preferredWidth: units.gu(3) |
447 | 118 | width: units.gu(7) | 119 | Layout.alignment: Qt.AlignRight |
448 | 119 | height: units.gu(7) | 120 | color: Theme.palette.selected.backgroundText |
449 | 120 | anchors { | 121 | |
450 | 121 | top: parent.top | 122 | MouseArea { |
451 | 122 | right: parent.right | 123 | anchors.fill: parent |
452 | 123 | } | 124 | onClicked: messageHeader.iconClicked() |
453 | 124 | opacity: 0.0 | 125 | } |
454 | 125 | enabled: heroMessageHeader.state === "expanded" | 126 | |
455 | 126 | 127 | SequentialAnimation { | |
456 | 127 | Image { | 128 | id: shake |
457 | 128 | id: appIconImage | 129 | PropertyAnimation { target: iconImage; property: "rotation"; duration: 50; to: -20 } |
458 | 129 | objectName: "appIcon" | 130 | SpringAnimation { target: iconImage; property: "rotation"; from: -20; to: 0; mass: 0.5; spring: 15; damping: 0.1 } |
459 | 130 | height: width | 131 | } |
343 | 131 | anchors { | ||
344 | 132 | left: parent.left | ||
345 | 133 | leftMargin: units.gu(2) | ||
346 | 134 | right: parent.right | ||
347 | 135 | rightMargin: units.gu(2) | ||
348 | 136 | topMargin: units.gu(1) | ||
349 | 137 | verticalCenter: parent.verticalCenter | ||
350 | 138 | } | ||
351 | 139 | fillMode: Image.PreserveAspectFit | ||
352 | 140 | } | ||
353 | 141 | |||
354 | 142 | MouseArea { | ||
355 | 143 | anchors.fill: parent | ||
356 | 144 | onClicked: heroMessageHeader.appIconClicked() | ||
357 | 145 | } | ||
358 | 146 | } | ||
359 | 147 | |||
360 | 148 | states: State { | ||
361 | 149 | name: "expanded" | ||
362 | 150 | |||
363 | 151 | PropertyChanges { | ||
364 | 152 | target: __appIcon | ||
365 | 153 | opacity: 1.0 | ||
366 | 154 | } | ||
367 | 155 | } | ||
368 | 156 | |||
369 | 157 | transitions: Transition { | ||
370 | 158 | NumberAnimation { | ||
371 | 159 | property: "opacity" | ||
372 | 160 | duration: 200 | ||
373 | 161 | easing.type: Easing.OutQuad | ||
460 | 162 | } | 132 | } |
461 | 163 | } | 133 | } |
462 | 164 | } | 134 | } |
463 | 165 | 135 | ||
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 | 19 | */ | 19 | */ |
469 | 20 | 20 | ||
470 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 |
473 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
474 | 23 | import Ubuntu.Components.ListItems 0.1 as ListItem | 23 | import Ubuntu.Components.ListItems 1.0 as ListItem |
475 | 24 | 24 | ||
476 | 25 | Item { | 25 | Item { |
477 | 26 | id: quickReply | 26 | id: quickReply |
478 | @@ -53,14 +53,14 @@ | |||
479 | 53 | width: units.gu(2) | 53 | width: units.gu(2) |
480 | 54 | height: width | 54 | height: width |
481 | 55 | fillMode: Image.PreserveAspectFit | 55 | fillMode: Image.PreserveAspectFit |
483 | 56 | source: "artwork/message_sms01_54px.png" | 56 | source: "image://theme/message" |
484 | 57 | } | 57 | } |
485 | 58 | 58 | ||
486 | 59 | Label { | 59 | Label { |
487 | 60 | height: parent.height | 60 | height: parent.height |
488 | 61 | verticalAlignment: Text.AlignVCenter | 61 | verticalAlignment: Text.AlignVCenter |
489 | 62 | fontSize: "small" | 62 | fontSize: "small" |
491 | 63 | text: "Quick reply with:" | 63 | text: i18n.tr("Quick reply with:") |
492 | 64 | } | 64 | } |
493 | 65 | } | 65 | } |
494 | 66 | 66 | ||
495 | 67 | 67 | ||
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 | 1 | /* | ||
501 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
502 | 3 | * | ||
503 | 4 | * This program is free software; you can redistribute it and/or modify | ||
504 | 5 | * it under the terms of the GNU General Public License as published by | ||
505 | 6 | * the Free Software Foundation; version 3. | ||
506 | 7 | * | ||
507 | 8 | * This program is distributed in the hope that it will be useful, | ||
508 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
509 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
510 | 11 | * GNU General Public License for more details. | ||
511 | 12 | * | ||
512 | 13 | * You should have received a copy of the GNU General Public License | ||
513 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
514 | 15 | */ | ||
515 | 16 | |||
516 | 17 | import QtQuick 2.0 | ||
517 | 18 | import Ubuntu.Components 0.1 | ||
518 | 19 | |||
519 | 20 | /* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more | ||
520 | 21 | * general (Item-based) components. This ability should be incorporated into the SDK's | ||
521 | 22 | * UbuntuShape so this file can be removed. | ||
522 | 23 | * Bug: https://bugs.launchpad.net/tavastia/+bug/1089595 | ||
523 | 24 | */ | ||
524 | 25 | Item { | ||
525 | 26 | property alias radius: shape.radius | ||
526 | 27 | property alias image: source.sourceItem | ||
527 | 28 | |||
528 | 29 | ShaderEffectSource { | ||
529 | 30 | id: source | ||
530 | 31 | anchors.centerIn: parent // Placed under shape, so it's hidden | ||
531 | 32 | width: 1 | ||
532 | 33 | height: 1 | ||
533 | 34 | hideSource: true | ||
534 | 35 | } | ||
535 | 36 | |||
536 | 37 | UbuntuShape { | ||
537 | 38 | id: shape | ||
538 | 39 | image: source | ||
539 | 40 | |||
540 | 41 | anchors.fill: parent | ||
541 | 42 | } | ||
542 | 43 | } | ||
543 | 0 | 44 | ||
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 | 1 | # export the artwork files. | ||
550 | 2 | export_qmlfiles(Ubuntu.Settings.Components.Art Ubuntu/Settings/Components/artwork DESTINATION ${QT_IMPORTS_DIR}) | ||
551 | 3 | 0 | ||
552 | === removed file 'Ubuntu/Settings/Components/artwork/message_sms01_54px.png' | |||
553 | 4 | Binary 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 | 1 | Binary 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 | 2 | 2 | ||
559 | 3 | ActionTextField 0.1 ActionTextField.qml | 3 | ActionTextField 0.1 ActionTextField.qml |
560 | 4 | Calendar 0.1 Calendar.qml | 4 | Calendar 0.1 Calendar.qml |
563 | 5 | HeroMessageHeader 0.1 HeroMessageHeader.qml | 5 | MessageHeader 0.1 MessageHeader.qml |
562 | 6 | IconVisual 0.1 IconVisual.qml | ||
564 | 7 | QuickReply 0.1 QuickReply.qml | 6 | QuickReply 0.1 QuickReply.qml |
565 | 8 | StatusIcon 0.1 StatusIcon.qml | 7 | StatusIcon 0.1 StatusIcon.qml |
566 | 8 | UbuntuShapeForItem 0.1 UbuntuShapeForItem.qml | ||
567 | 9 | 9 | ||
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 | 18 | */ | 18 | */ |
573 | 19 | 19 | ||
574 | 20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 |
577 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 1.1 |
578 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | 22 | import Ubuntu.Components.ListItems 1.0 as ListItem |
579 | 23 | 23 | ||
580 | 24 | ListItem.Empty { | 24 | ListItem.Empty { |
581 | 25 | id: menu | 25 | id: menu |
583 | 26 | implicitHeight: units.gu(5.5) | 26 | __height: units.gu(5.5) |
584 | 27 | 27 | ||
586 | 28 | property bool checked: false | 28 | property bool active: false |
587 | 29 | property bool secure: false | 29 | property bool secure: false |
588 | 30 | property bool adHoc: false | 30 | property bool adHoc: false |
589 | 31 | property int signalStrength: 0 | 31 | property int signalStrength: 0 |
590 | 32 | property alias text: label.text | 32 | property alias text: label.text |
591 | 33 | 33 | ||
602 | 34 | __acceptEvents: false | 34 | Icon { |
603 | 35 | 35 | id: iconSignal | |
604 | 36 | CheckBox { | 36 | objectName: "iconSignal" |
605 | 37 | id: checkbox | 37 | |
606 | 38 | objectName: "checkBox" | 38 | color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText |
607 | 39 | property bool enableCheckConnection: true | 39 | |
608 | 40 | 40 | width: height | |
609 | 41 | height: units.gu(3) | 41 | height: Math.min(units.gu(3), parent.height - units.gu(1)) |
600 | 42 | width: units.gu(3) | ||
601 | 43 | |||
610 | 44 | anchors { | 42 | anchors { |
611 | 45 | left: parent.left | 43 | left: parent.left |
612 | 46 | leftMargin: menu.__contentsMargins | 44 | leftMargin: menu.__contentsMargins |
613 | 47 | verticalCenter: parent.verticalCenter | 45 | verticalCenter: parent.verticalCenter |
614 | 48 | } | 46 | } |
615 | 49 | 47 | ||
616 | 50 | // need onCompleted to set the initial value | ||
617 | 51 | // can't use binding otherwise we will get feedback from connections. | ||
618 | 52 | Component.onCompleted: { | ||
619 | 53 | enableCheckConnection = false; | ||
620 | 54 | checked = menu.checked; | ||
621 | 55 | enableCheckConnection = true; | ||
622 | 56 | } | ||
623 | 57 | |||
624 | 58 | // FIXME : should use Checkbox.toggled signal | ||
625 | 59 | // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled | ||
626 | 60 | onCheckedChanged: { | ||
627 | 61 | if (!enableCheckConnection) { | ||
628 | 62 | return; | ||
629 | 63 | } | ||
630 | 64 | var oldEnable = enableCheckConnection; | ||
631 | 65 | enableCheckConnection = false; | ||
632 | 66 | |||
633 | 67 | menu.checked = checked; | ||
634 | 68 | menu.triggered(menu.checked); | ||
635 | 69 | |||
636 | 70 | enableCheckConnection = oldEnable; | ||
637 | 71 | } | ||
638 | 72 | |||
639 | 73 | Connections { | ||
640 | 74 | target: menu | ||
641 | 75 | onCheckedChanged: { | ||
642 | 76 | if (!checkbox.enableCheckConnection) { | ||
643 | 77 | return; | ||
644 | 78 | } | ||
645 | 79 | var oldEnable = checkbox.enableCheckConnection; | ||
646 | 80 | checkbox.enableCheckConnection = false; | ||
647 | 81 | |||
648 | 82 | checkbox.checked = menu.checked; | ||
649 | 83 | |||
650 | 84 | checkbox.enableCheckConnection = oldEnable; | ||
651 | 85 | } | ||
652 | 86 | } | ||
653 | 87 | |||
654 | 88 | Connections { | ||
655 | 89 | target: menu.__mouseArea | ||
656 | 90 | onClicked: { | ||
657 | 91 | checkbox.clicked(); | ||
658 | 92 | } | ||
659 | 93 | } | ||
660 | 94 | } | ||
661 | 95 | |||
662 | 96 | Icon { | ||
663 | 97 | id: iconSignal | ||
664 | 98 | objectName: "iconSignal" | ||
665 | 99 | |||
666 | 100 | color: Theme.palette.selected.backgroundText | ||
667 | 101 | |||
668 | 102 | width: height | ||
669 | 103 | height: Math.min(units.gu(3), parent.height - units.gu(1)) | ||
670 | 104 | anchors { | ||
671 | 105 | left: checkbox.right | ||
672 | 106 | leftMargin: units.gu(1) | ||
673 | 107 | verticalCenter: parent.verticalCenter | ||
674 | 108 | } | ||
675 | 109 | |||
676 | 110 | name: { | 48 | name: { |
677 | 111 | var imageName = "nm-signal-100" | 49 | var imageName = "nm-signal-100" |
678 | 112 | 50 | ||
679 | @@ -135,7 +73,7 @@ | |||
680 | 135 | rightMargin: menu.__contentsMargins | 73 | rightMargin: menu.__contentsMargins |
681 | 136 | } | 74 | } |
682 | 137 | elide: Text.ElideRight | 75 | elide: Text.ElideRight |
684 | 138 | opacity: label.enabled ? 1.0 : 0.5 | 76 | color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText |
685 | 139 | } | 77 | } |
686 | 140 | 78 | ||
687 | 141 | Icon { | 79 | Icon { |
688 | @@ -144,7 +82,7 @@ | |||
689 | 144 | visible: secure | 82 | visible: secure |
690 | 145 | name: "network-secure" | 83 | name: "network-secure" |
691 | 146 | 84 | ||
693 | 147 | color: Theme.palette.selected.backgroundText | 85 | color: active ? UbuntuColors.green : Theme.palette.selected.backgroundText |
694 | 148 | 86 | ||
695 | 149 | width: height | 87 | width: height |
696 | 150 | height: Math.min(units.gu(3), parent.height - units.gu(1)) | 88 | height: Math.min(units.gu(3), parent.height - units.gu(1)) |
697 | 151 | 89 | ||
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 | 17 | */ | 17 | */ |
703 | 18 | 18 | ||
704 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
718 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
719 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | |
720 | 22 | 22 | StandardMenu { | |
721 | 23 | ListItem.Standard { | 23 | id: menu |
722 | 24 | property alias buttonText: button.text | 24 | property string buttonText |
723 | 25 | 25 | ||
724 | 26 | iconFrame: false | 26 | component: Component { |
725 | 27 | Component.onCompleted: button.clicked.connect(clicked) | 27 | Button { |
726 | 28 | 28 | id: button | |
727 | 29 | control: Button { | 29 | objectName: "button" |
728 | 30 | id: button | 30 | text: menu.buttonText |
729 | 31 | objectName: "button" | 31 | width: Math.max(units.gu(5), implicitWidth) |
730 | 32 | width: Math.max(units.gu(5), implicitWidth) | 32 | |
731 | 33 | onClicked: menu.clicked() | ||
732 | 34 | } | ||
733 | 33 | } | 35 | } |
734 | 34 | } | 36 | } |
735 | 35 | 37 | ||
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 | 1 | project(UbuntuSettingsMenusQml) | 1 | project(UbuntuSettingsMenusQml) |
741 | 2 | 2 | ||
742 | 3 | add_subdirectory(artwork) | ||
743 | 4 | |||
744 | 5 | find_package(Qt5Core REQUIRED) | 3 | find_package(Qt5Core REQUIRED) |
745 | 6 | 4 | ||
746 | 7 | include_directories( | 5 | include_directories( |
747 | 8 | 6 | ||
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 | 17 | */ | 17 | */ |
753 | 18 | 18 | ||
754 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
757 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
758 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
759 | 22 | import Ubuntu.Settings.Components 0.1 | 22 | import Ubuntu.Settings.Components 0.1 |
760 | 23 | 23 | ||
761 | 24 | ListItem.Empty { | 24 | ListItem.Empty { |
762 | @@ -31,7 +31,7 @@ | |||
763 | 31 | property alias minimumDate: calendar.minimumDate | 31 | property alias minimumDate: calendar.minimumDate |
764 | 32 | property alias selectedDate: calendar.selectedDate | 32 | property alias selectedDate: calendar.selectedDate |
765 | 33 | 33 | ||
767 | 34 | implicitHeight: column.height | 34 | __height: column.height |
768 | 35 | 35 | ||
769 | 36 | Column { | 36 | Column { |
770 | 37 | id: column | 37 | id: column |
771 | @@ -54,7 +54,6 @@ | |||
772 | 54 | right: parent.right | 54 | right: parent.right |
773 | 55 | } | 55 | } |
774 | 56 | fontSize: "large" | 56 | fontSize: "large" |
775 | 57 | //ItemStyle.class: "label label-date" | ||
776 | 58 | text: Qt.formatDate(calendar.currentDate, "MMMM") + " " + calendar.currentDate.getFullYear() | 57 | text: Qt.formatDate(calendar.currentDate, "MMMM") + " " + calendar.currentDate.getFullYear() |
777 | 59 | } | 58 | } |
778 | 60 | 59 | ||
779 | 61 | 60 | ||
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 | 18 | */ | 18 | */ |
785 | 19 | 19 | ||
786 | 20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 |
789 | 21 | import Ubuntu.Components 0.1 as Components | 21 | import Ubuntu.Components 1.1 as Components |
790 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | 22 | import Ubuntu.Components.ListItems 1.0 as ListItem |
791 | 23 | 23 | ||
792 | 24 | ListItem.Empty { | 24 | ListItem.Empty { |
793 | 25 | id: menu | 25 | id: menu |
794 | 26 | 26 | ||
795 | 27 | property alias text: label.text | 27 | property alias text: label.text |
796 | 28 | property bool checked: false | 28 | property bool checked: false |
798 | 29 | __acceptEvents: false | 29 | |
799 | 30 | onClicked: menu.checked = !menu.checked | ||
800 | 30 | 31 | ||
801 | 31 | Components.CheckBox { | 32 | Components.CheckBox { |
802 | 32 | id: checkbox | 33 | id: checkbox |
803 | @@ -43,8 +44,7 @@ | |||
804 | 43 | checked = menu.checked; | 44 | checked = menu.checked; |
805 | 44 | } | 45 | } |
806 | 45 | 46 | ||
809 | 46 | // FIXME : should use Checkbox.toggled signal | 47 | // FIXME : create a bi-directional feedback component |
808 | 47 | // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled | ||
810 | 48 | onCheckedChanged: { | 48 | onCheckedChanged: { |
811 | 49 | if (!enableCheckConnection) { | 49 | if (!enableCheckConnection) { |
812 | 50 | return; | 50 | return; |
813 | @@ -72,13 +72,6 @@ | |||
814 | 72 | checkbox.enableCheckConnection = oldEnable; | 72 | checkbox.enableCheckConnection = oldEnable; |
815 | 73 | } | 73 | } |
816 | 74 | } | 74 | } |
817 | 75 | |||
818 | 76 | Connections { | ||
819 | 77 | target: menu.__mouseArea | ||
820 | 78 | onClicked: { | ||
821 | 79 | checkbox.clicked(); | ||
822 | 80 | } | ||
823 | 81 | } | ||
824 | 82 | } | 75 | } |
825 | 83 | 76 | ||
826 | 84 | Components.Label { | 77 | Components.Label { |
827 | @@ -91,6 +84,5 @@ | |||
828 | 91 | verticalCenter: parent.verticalCenter | 84 | verticalCenter: parent.verticalCenter |
829 | 92 | } | 85 | } |
830 | 93 | elide: Text.ElideRight | 86 | elide: Text.ElideRight |
831 | 94 | opacity: label.enabled ? 1.0 : 0.5 | ||
832 | 95 | } | 87 | } |
833 | 96 | } | 88 | } |
834 | 97 | 89 | ||
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 | 17 | */ | 17 | */ |
840 | 18 | 18 | ||
841 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
845 | 20 | import Ubuntu.Components 0.1 as Components | 20 | import Ubuntu.Components 1.1 |
846 | 21 | import Ubuntu.Settings.Components 0.1 as USC | 21 | import Ubuntu.Components.ListItems 1.0 as ListItems |
844 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItems | ||
847 | 23 | 22 | ||
848 | 24 | ListItems.Empty { | 23 | ListItems.Empty { |
849 | 25 | id: menu | 24 | id: menu |
850 | @@ -29,10 +28,10 @@ | |||
851 | 29 | property alias time: dateLabel.text | 28 | property alias time: dateLabel.text |
852 | 30 | property alias eventColor: iconVisual.color | 29 | property alias eventColor: iconVisual.color |
853 | 31 | 30 | ||
855 | 32 | USC.IconVisual { | 31 | Icon { |
856 | 33 | id: iconVisual | 32 | id: iconVisual |
857 | 34 | source: "image://theme/calendar" | 33 | source: "image://theme/calendar" |
859 | 35 | visible: status == Image.Ready | 34 | visible: source != "" |
860 | 36 | color: Theme.palette.selected.backgroundText | 35 | color: Theme.palette.selected.backgroundText |
861 | 37 | 36 | ||
862 | 38 | height: Math.min(units.gu(3), parent.height - units.gu(1)) | 37 | height: Math.min(units.gu(3), parent.height - units.gu(1)) |
863 | @@ -45,7 +44,7 @@ | |||
864 | 45 | } | 44 | } |
865 | 46 | } | 45 | } |
866 | 47 | 46 | ||
868 | 48 | Components.Label { | 47 | Label { |
869 | 49 | id: label | 48 | id: label |
870 | 50 | anchors { | 49 | anchors { |
871 | 51 | verticalCenter: parent.verticalCenter | 50 | verticalCenter: parent.verticalCenter |
872 | @@ -55,17 +54,18 @@ | |||
873 | 55 | rightMargin: menu.__contentsMargins | 54 | rightMargin: menu.__contentsMargins |
874 | 56 | } | 55 | } |
875 | 57 | elide: Text.ElideRight | 56 | elide: Text.ElideRight |
877 | 58 | opacity: label.enabled ? 1.0 : 0.5 | 57 | maximumLineCount: 1 |
878 | 58 | opacity: enabled ? 1.0 : 0.5 | ||
879 | 59 | } | 59 | } |
880 | 60 | 60 | ||
882 | 61 | Components.Label { | 61 | Label { |
883 | 62 | id: dateLabel | 62 | id: dateLabel |
884 | 63 | color: Theme.palette.normal.backgroundText | ||
885 | 64 | 63 | ||
886 | 65 | anchors { | 64 | anchors { |
887 | 66 | verticalCenter: parent.verticalCenter | 65 | verticalCenter: parent.verticalCenter |
888 | 67 | right: parent.right | 66 | right: parent.right |
889 | 68 | rightMargin: menu.__contentsMargins | 67 | rightMargin: menu.__contentsMargins |
890 | 69 | } | 68 | } |
891 | 69 | opacity: enabled ? 1.0 : 0.5 | ||
892 | 70 | } | 70 | } |
893 | 71 | } | 71 | } |
894 | 72 | 72 | ||
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 | 19 | */ | 19 | */ |
900 | 20 | 20 | ||
901 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 |
904 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
905 | 23 | import Ubuntu.Components.ListItems 0.1 as ListItem | 23 | import Ubuntu.Components.ListItems 1.0 as ListItem |
906 | 24 | 24 | ||
908 | 25 | ListItem.Standard { | 25 | StandardMenu { |
909 | 26 | id: menu | 26 | id: menu |
910 | 27 | 27 | ||
912 | 28 | property alias count: label.text | 28 | property string count: "0" |
913 | 29 | 29 | ||
914 | 30 | signal dismissed() | 30 | signal dismissed() |
915 | 31 | 31 | ||
944 | 32 | iconSource: Qt.resolvedUrl("artwork/default_app.svg") | 32 | iconSource: Qt.resolvedUrl("image://theme/message") |
945 | 33 | 33 | ||
946 | 34 | control: UbuntuShape { | 34 | component: Component { |
947 | 35 | height: label.height + units.gu(2) | 35 | UbuntuShape { |
948 | 36 | width: label.width + units.gu(2) | 36 | height: label.implicitHeight + units.gu(2) |
949 | 37 | color: Theme.palette.normal.backgroundText | 37 | width: label.implicitWidth + units.gu(2) |
950 | 38 | radius: "medium" | 38 | |
951 | 39 | 39 | color: Theme.palette.normal.backgroundText | |
952 | 40 | Label { | 40 | radius: "medium" |
953 | 41 | id: label | 41 | |
954 | 42 | objectName: "messageCount" | 42 | Label { |
955 | 43 | 43 | id: label | |
956 | 44 | anchors { | 44 | objectName: "messageCount" |
957 | 45 | horizontalCenter: parent.horizontalCenter | 45 | |
958 | 46 | verticalCenter: parent.verticalCenter | 46 | anchors { |
959 | 47 | } | 47 | horizontalCenter: parent.horizontalCenter |
960 | 48 | horizontalAlignment: Text.AlignRight | 48 | verticalCenter: parent.verticalCenter |
961 | 49 | font.weight: Font.DemiBold | 49 | } |
962 | 50 | fontSize: "medium" | 50 | horizontalAlignment: Text.AlignRight |
963 | 51 | text: "0" | 51 | font.weight: Font.DemiBold |
964 | 52 | 52 | fontSize: "medium" | |
965 | 53 | color: Theme.palette.normal.foregroundText | 53 | text: menu.count |
966 | 54 | } | 54 | |
967 | 55 | 55 | color: Theme.palette.normal.foregroundText | |
940 | 56 | Connections { | ||
941 | 57 | target: menu.__mouseArea | ||
942 | 58 | onClicked: { | ||
943 | 59 | menu.clicked(); | ||
968 | 60 | } | 56 | } |
969 | 61 | } | 57 | } |
970 | 62 | } | 58 | } |
971 | 63 | 59 | ||
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 | 17 | */ | 17 | */ |
977 | 18 | 18 | ||
978 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
981 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
982 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
983 | 22 | import QtQuick.Layouts 1.1 | ||
984 | 22 | 23 | ||
985 | 23 | ListItem.Empty { | 24 | ListItem.Empty { |
986 | 24 | id: menu | 25 | id: menu |
987 | 25 | 26 | ||
989 | 26 | property bool running: false | 27 | property bool showTrack: false |
990 | 27 | property alias playerName: playerNameLabel.text | 28 | property alias playerName: playerNameLabel.text |
991 | 28 | property alias playerIcon: playerIcon.source | 29 | property alias playerIcon: playerIcon.source |
992 | 29 | 30 | ||
993 | @@ -32,7 +33,7 @@ | |||
994 | 32 | property alias artist: artistLabel.text | 33 | property alias artist: artistLabel.text |
995 | 33 | property alias album: albumLabel.text | 34 | property alias album: albumLabel.text |
996 | 34 | 35 | ||
998 | 35 | implicitHeight: column.height + units.gu(2) | 36 | __height: column.height + units.gu(2) |
999 | 36 | Behavior on implicitHeight { UbuntuNumberAnimation {} } | 37 | Behavior on implicitHeight { UbuntuNumberAnimation {} } |
1000 | 37 | 38 | ||
1001 | 38 | Column { | 39 | Column { |
1002 | @@ -40,48 +41,43 @@ | |||
1003 | 40 | anchors { | 41 | anchors { |
1004 | 41 | left: parent.left | 42 | left: parent.left |
1005 | 42 | right: parent.right | 43 | right: parent.right |
1006 | 43 | top: parent.top | ||
1007 | 44 | topMargin: units.gu(1) | ||
1008 | 45 | leftMargin: menu.__contentsMargins | 44 | leftMargin: menu.__contentsMargins |
1009 | 46 | rightMargin: menu.__contentsMargins | 45 | rightMargin: menu.__contentsMargins |
1010 | 46 | verticalCenter: parent.verticalCenter | ||
1011 | 47 | } | 47 | } |
1012 | 48 | height: running ? trackRow.height : playerRow.height | ||
1013 | 49 | 48 | ||
1015 | 50 | Row { | 49 | RowLayout { |
1016 | 51 | objectName: "player" | 50 | objectName: "player" |
1017 | 52 | id: playerRow | 51 | id: playerRow |
1018 | 53 | spacing: menu.__contentsMargins | 52 | spacing: menu.__contentsMargins |
1030 | 54 | visible: !running | 53 | visible: !showTrack |
1031 | 55 | 54 | anchors { left: parent.left; right: parent.right } | |
1032 | 56 | Behavior on opacity { UbuntuNumberAnimation {} } | 55 | |
1033 | 57 | 56 | Image { | |
1034 | 58 | UbuntuShape { | 57 | id: playerIcon |
1035 | 59 | width: units.gu(5) | 58 | Layout.preferredHeight: units.gu(5) |
1036 | 60 | height: width | 59 | Layout.preferredWidth: units.gu(5) |
1026 | 61 | |||
1027 | 62 | image: Image { | ||
1028 | 63 | id: playerIcon | ||
1029 | 64 | } | ||
1037 | 65 | } | 60 | } |
1038 | 66 | 61 | ||
1039 | 67 | Label { | 62 | Label { |
1040 | 68 | id: playerNameLabel | 63 | id: playerNameLabel |
1042 | 69 | anchors.verticalCenter: parent.verticalCenter | 64 | Layout.fillWidth: true |
1043 | 65 | Layout.alignment: Qt.AlignVCenter | ||
1044 | 66 | elide: Text.ElideRight | ||
1045 | 67 | maximumLineCount: 1 | ||
1046 | 70 | } | 68 | } |
1047 | 71 | } | 69 | } |
1048 | 72 | 70 | ||
1050 | 73 | Row { | 71 | RowLayout { |
1051 | 74 | objectName: "albumArt" | 72 | objectName: "albumArt" |
1052 | 75 | id: trackRow | 73 | id: trackRow |
1053 | 76 | width: menu.width | ||
1054 | 77 | spacing: units.gu(2) | 74 | spacing: units.gu(2) |
1058 | 78 | visible: running | 75 | visible: showTrack |
1059 | 79 | 76 | anchors { left: parent.left; right: parent.right } | |
1057 | 80 | Behavior on opacity { UbuntuNumberAnimation {} } | ||
1060 | 81 | 77 | ||
1061 | 82 | UbuntuShape { | 78 | UbuntuShape { |
1064 | 83 | width: units.gu(10) | 79 | Layout.preferredHeight: units.gu(8) |
1065 | 84 | height: width | 80 | Layout.preferredWidth: units.gu(8) |
1066 | 85 | 81 | ||
1067 | 86 | image: Image { | 82 | image: Image { |
1068 | 87 | id: albumArtImage | 83 | id: albumArtImage |
1069 | @@ -89,19 +85,33 @@ | |||
1070 | 89 | } | 85 | } |
1071 | 90 | 86 | ||
1072 | 91 | Column { | 87 | Column { |
1075 | 92 | spacing: units.gu(1) | 88 | Layout.alignment: Qt.AlignVCenter |
1076 | 93 | anchors.verticalCenter: parent.verticalCenter | 89 | Layout.fillWidth: true |
1077 | 90 | spacing: units.gu(0.5) | ||
1078 | 94 | 91 | ||
1079 | 95 | Label { | 92 | Label { |
1080 | 96 | id: songLabel | 93 | id: songLabel |
1081 | 94 | elide: Text.ElideRight | ||
1082 | 95 | maximumLineCount: 1 | ||
1083 | 96 | visible: text !== "" | ||
1084 | 97 | anchors { left: parent.left; right: parent.right } | ||
1085 | 97 | } | 98 | } |
1086 | 98 | 99 | ||
1087 | 99 | Label { | 100 | Label { |
1088 | 100 | id: artistLabel | 101 | id: artistLabel |
1089 | 102 | elide: Text.ElideRight | ||
1090 | 103 | maximumLineCount: 1 | ||
1091 | 104 | visible: text !== "" | ||
1092 | 105 | anchors { left: parent.left; right: parent.right } | ||
1093 | 101 | } | 106 | } |
1094 | 102 | 107 | ||
1095 | 103 | Label { | 108 | Label { |
1096 | 104 | id: albumLabel | 109 | id: albumLabel |
1097 | 110 | elide: Text.ElideRight | ||
1098 | 111 | maximumLineCount: 1 | ||
1099 | 112 | fontSize: "small" | ||
1100 | 113 | visible: text !== "" | ||
1101 | 114 | anchors { left: parent.left; right: parent.right } | ||
1102 | 105 | } | 115 | } |
1103 | 106 | } | 116 | } |
1104 | 107 | } | 117 | } |
1105 | 108 | 118 | ||
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 | 17 | */ | 17 | */ |
1111 | 18 | 18 | ||
1112 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
1115 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
1116 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1117 | 22 | import QtQuick.Layouts 1.1 | ||
1118 | 22 | 23 | ||
1119 | 23 | ListItem.Empty { | 24 | ListItem.Empty { |
1120 | 24 | id: menu | 25 | id: menu |
1121 | @@ -33,66 +34,74 @@ | |||
1122 | 33 | signal play(bool play) | 34 | signal play(bool play) |
1123 | 34 | signal previous() | 35 | signal previous() |
1124 | 35 | 36 | ||
1138 | 36 | implicitHeight: controlsRow.height + units.gu(2) | 37 | highlightWhenPressed: false |
1139 | 37 | 38 | implicitHeight: layout.implicitHeight + units.gu(2) | |
1140 | 38 | Row { | 39 | |
1141 | 39 | id: controlsRow | 40 | RowLayout { |
1142 | 40 | 41 | id: layout | |
1143 | 41 | anchors { | 42 | anchors.centerIn: parent |
1144 | 42 | top: parent.top | 43 | spacing: units.gu(3) |
1145 | 43 | topMargin: units.gu(1) | 44 | |
1146 | 44 | horizontalCenter: parent.horizontalCenter | 45 | Icon { |
1134 | 45 | } | ||
1135 | 46 | spacing: units.gu(2) | ||
1136 | 47 | |||
1137 | 48 | Button { | ||
1147 | 49 | objectName: "previousButton" | 46 | objectName: "previousButton" |
1152 | 50 | width: units.gu(5) | 47 | |
1153 | 51 | height: width | 48 | Layout.preferredWidth: units.gu(5) |
1154 | 52 | onClicked: menu.previous() | 49 | Layout.preferredHeight: units.gu(5) |
1155 | 53 | text: "" | 50 | |
1156 | 51 | source: "image://theme/media-skip-backward" | ||
1157 | 52 | color: { | ||
1158 | 53 | if (!enabled) | ||
1159 | 54 | return Theme.palette.normal.backgroundText; | ||
1160 | 55 | return prevMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText; | ||
1161 | 56 | } | ||
1162 | 54 | enabled: canGoPrevious | 57 | enabled: canGoPrevious |
1163 | 55 | anchors.verticalCenter: parent.verticalCenter | ||
1164 | 56 | 58 | ||
1166 | 57 | Icon { | 59 | MouseArea { |
1167 | 60 | id: prevMA | ||
1168 | 58 | anchors.fill: parent | 61 | anchors.fill: parent |
1172 | 59 | anchors.margins: units.gu(1) | 62 | onClicked: menu.previous() |
1170 | 60 | name: "media-skip-backward" | ||
1171 | 61 | color: Theme.palette.normal.foregroundText | ||
1173 | 62 | } | 63 | } |
1174 | 63 | } | 64 | } |
1175 | 64 | 65 | ||
1177 | 65 | Button { | 66 | Icon { |
1178 | 66 | objectName: "playButton" | 67 | objectName: "playButton" |
1183 | 67 | width: units.gu(6) | 68 | |
1184 | 68 | height: width | 69 | Layout.preferredWidth: units.gu(5) |
1185 | 69 | onClicked: menu.play(!playing) | 70 | Layout.preferredHeight: units.gu(5) |
1186 | 70 | text: "" | 71 | |
1187 | 72 | source: playing ? "image://theme/media-playback-pause" : "image://theme/media-playback-start" | ||
1188 | 73 | color: { | ||
1189 | 74 | if (!enabled) | ||
1190 | 75 | return Theme.palette.normal.backgroundText; | ||
1191 | 76 | return playMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText; | ||
1192 | 77 | } | ||
1193 | 71 | enabled: canPlay | 78 | enabled: canPlay |
1194 | 72 | anchors.verticalCenter: parent.verticalCenter | ||
1195 | 73 | 79 | ||
1197 | 74 | Icon { | 80 | MouseArea { |
1198 | 81 | id: playMA | ||
1199 | 75 | anchors.fill: parent | 82 | anchors.fill: parent |
1203 | 76 | anchors.margins: units.gu(1) | 83 | onClicked: menu.play(!playing) |
1201 | 77 | name: playing ? "media-playback-pause" : "media-playback-start" | ||
1202 | 78 | color: Theme.palette.normal.foregroundText | ||
1204 | 79 | } | 84 | } |
1205 | 80 | } | 85 | } |
1206 | 81 | 86 | ||
1208 | 82 | Button { | 87 | Icon { |
1209 | 83 | objectName: "nextButton" | 88 | objectName: "nextButton" |
1214 | 84 | width: units.gu(5) | 89 | |
1215 | 85 | height: width | 90 | Layout.preferredWidth: units.gu(5) |
1216 | 86 | onClicked: menu.next() | 91 | Layout.preferredHeight: units.gu(5) |
1217 | 87 | text: "" | 92 | |
1218 | 93 | source: "image://theme/media-skip-forward" | ||
1219 | 94 | color: { | ||
1220 | 95 | if (!enabled) | ||
1221 | 96 | return Theme.palette.normal.backgroundText; | ||
1222 | 97 | return nextMA.pressed ? Theme.palette.selected.foreground : Theme.palette.normal.foregroundText; | ||
1223 | 98 | } | ||
1224 | 88 | enabled: canGoNext | 99 | enabled: canGoNext |
1225 | 89 | anchors.verticalCenter: parent.verticalCenter | ||
1226 | 90 | 100 | ||
1228 | 91 | Icon { | 101 | MouseArea { |
1229 | 102 | id: nextMA | ||
1230 | 92 | anchors.fill: parent | 103 | anchors.fill: parent |
1234 | 93 | anchors.margins: units.gu(1) | 104 | onClicked: menu.next() |
1232 | 94 | name: "media-skip-forward" | ||
1233 | 95 | color: Theme.palette.normal.foregroundText | ||
1235 | 96 | } | 105 | } |
1236 | 97 | } | 106 | } |
1237 | 98 | } | 107 | } |
1238 | 99 | 108 | ||
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 | 17 | */ | 17 | */ |
1244 | 18 | 18 | ||
1245 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
1258 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
1259 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1260 | 22 | 22 | ||
1261 | 23 | ListItem.Standard { | 23 | StandardMenu { |
1262 | 24 | property alias indeterminate: progressBar.indeterminate | 24 | id: menu |
1263 | 25 | property alias minimumValue: progressBar.minimumValue | 25 | property bool indeterminate: false |
1264 | 26 | property alias maximumValue: progressBar.maximumValue | 26 | property real minimumValue: 0.0 |
1265 | 27 | property alias value: progressBar.value | 27 | property real maximumValue: 1.0 |
1266 | 28 | 28 | property real value: 0.0 | |
1267 | 29 | control: ProgressBar { | 29 | |
1268 | 30 | id: progressBar | 30 | component: Component { |
1269 | 31 | width: units.gu(20) | 31 | ProgressBar { |
1270 | 32 | id: progressBar | ||
1271 | 33 | width: units.gu(20) | ||
1272 | 34 | |||
1273 | 35 | indeterminate: menu.indeterminate | ||
1274 | 36 | minimumValue: menu.minimumValue | ||
1275 | 37 | maximumValue: menu.maximumValue | ||
1276 | 38 | value: menu.value | ||
1277 | 39 | } | ||
1278 | 32 | } | 40 | } |
1279 | 33 | } | 41 | } |
1280 | 34 | 42 | ||
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 | 18 | */ | 18 | */ |
1286 | 19 | 19 | ||
1287 | 20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 |
1290 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 1.1 |
1289 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
1291 | 23 | 22 | ||
1293 | 24 | ListItem.Standard { | 23 | StandardMenu { |
1294 | 25 | id: menuItem | 24 | id: menuItem |
1295 | 26 | 25 | ||
1296 | 27 | property int value : 0.0 | 26 | property int value : 0.0 |
1297 | 28 | 27 | ||
1301 | 29 | control: Label { | 28 | component: Component { |
1302 | 30 | id: progress | 29 | Label { |
1303 | 31 | objectName: "progress" | 30 | id: progress |
1304 | 31 | objectName: "progress" | ||
1305 | 32 | 32 | ||
1308 | 33 | text: menuItem.value + " %" | 33 | text: menuItem.value + " %" |
1309 | 34 | fontSize: "medium" | 34 | fontSize: "medium" |
1310 | 35 | } | ||
1311 | 35 | } | 36 | } |
1312 | 36 | } | 37 | } |
1313 | 37 | 38 | ||
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 | 18 | */ | 18 | */ |
1319 | 19 | 19 | ||
1320 | 20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 |
1323 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 1.1 |
1324 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | 22 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1325 | 23 | 23 | ||
1326 | 24 | ListItem.Header { | 24 | ListItem.Header { |
1327 | 25 | id: menuItem | 25 | id: menuItem |
1328 | 26 | 26 | ||
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 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
1335 | 2 | import Ubuntu.Components.ListItems 0.1 as ListItem | 2 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1336 | 3 | 3 | ||
1337 | 4 | ListItem.Empty { | 4 | ListItem.Empty { |
1344 | 5 | implicitHeight: units.gu(1) | 5 | __height: units.gu(1) |
1345 | 6 | 6 | highlightWhenPressed: false | |
1340 | 7 | Rectangle { | ||
1341 | 8 | color: Qt.rgba(0.0, 0, 0, 0.15) | ||
1342 | 9 | anchors.fill: parent | ||
1343 | 10 | } | ||
1346 | 11 | } | 7 | } |
1347 | 12 | 8 | ||
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 | 18 | * Olivier Tilloy <olivier.tilloy@canonical.com> | 18 | * Olivier Tilloy <olivier.tilloy@canonical.com> |
1353 | 19 | */ | 19 | */ |
1354 | 20 | 20 | ||
1358 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.1 |
1359 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
1360 | 23 | import Ubuntu.Components.ListItems 0.1 as ListItem | 23 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1361 | 24 | import Ubuntu.Settings.Components 0.1 as USC | 24 | import Ubuntu.Settings.Components 0.1 as USC |
1362 | 25 | import QtQuick.Layouts 1.1 | ||
1363 | 25 | 26 | ||
1364 | 26 | ListItem.Empty { | 27 | ListItem.Empty { |
1365 | 27 | id: menu | 28 | id: menu |
1366 | 28 | 29 | ||
1370 | 29 | property alias heroMessageHeader: __heroMessageHeader | 30 | property alias title: messageHeader.title |
1371 | 30 | property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2) | 31 | property alias time: messageHeader.time |
1372 | 31 | property real expandedHeight: collapsedHeight | 32 | property alias body: messageHeader.body |
1373 | 32 | 33 | ||
1374 | 33 | property url avatar | 34 | property url avatar |
1376 | 34 | property url appIcon | 35 | property url icon |
1377 | 35 | 36 | ||
1379 | 36 | signal appActivated | 37 | signal iconActivated |
1380 | 37 | signal dismissed | 38 | signal dismissed |
1381 | 38 | 39 | ||
1410 | 39 | implicitHeight: collapsedHeight | 40 | property alias footer: footerLoader.sourceComponent |
1411 | 40 | 41 | property real _animationDuration: UbuntuAnimation.FastDuration | |
1412 | 41 | Rectangle { | 42 | |
1413 | 42 | id: background | 43 | __height: layout.implicitHeight + units.gu(3) |
1414 | 43 | property real alpha: 0.0 | 44 | clip: heightAnimation.running |
1415 | 44 | 45 | ||
1416 | 45 | anchors.fill: parent | 46 | ColumnLayout { |
1417 | 46 | color: Qt.rgba(1.0, 1.0, 1.0, alpha) | 47 | id: layout |
1418 | 47 | z: -1 | 48 | |
1419 | 48 | } | 49 | anchors { |
1420 | 49 | 50 | left: parent.left | |
1421 | 50 | USC.HeroMessageHeader { | 51 | right: parent.right |
1422 | 51 | id: __heroMessageHeader | 52 | leftMargin: units.gu(2) |
1423 | 52 | 53 | rightMargin: units.gu(2) | |
1424 | 53 | anchors.top: parent.top | 54 | top: parent.top |
1425 | 54 | anchors.left: parent.left | 55 | topMargin: units.gu(1.5) |
1426 | 55 | anchors.right: parent.right | 56 | } |
1427 | 56 | 57 | spacing: units.gu(1.5) | |
1428 | 57 | avatar: menu.avatar != "" ? menu.avatar : "artwork/default_contact.png" | 58 | |
1429 | 58 | appIcon: menu.appIcon != "" ? menu.appIcon : "artwork/default_app.svg" | 59 | USC.MessageHeader { |
1430 | 59 | icon: appIcon | 60 | id: messageHeader |
1431 | 60 | 61 | Layout.fillWidth: true | |
1432 | 61 | state: menu.state | 62 | Layout.alignment: Qt.AlignTop |
1433 | 62 | 63 | ||
1434 | 63 | onAppIconClicked: { | 64 | avatar: menu.avatar != "" ? menu.avatar : "image://theme/contact" |
1435 | 64 | menu.appActivated(); | 65 | icon: menu.icon != "" ? menu.icon : "image://theme/message" |
1436 | 65 | } | 66 | |
1437 | 66 | } | 67 | state: menu.state |
1438 | 68 | |||
1439 | 69 | onIconClicked: { | ||
1440 | 70 | menu.iconActivated(); | ||
1441 | 71 | } | ||
1442 | 72 | } | ||
1443 | 73 | |||
1444 | 74 | Loader { | ||
1445 | 75 | id: footerLoader | ||
1446 | 76 | visible: menu.state === "expanded" | ||
1447 | 77 | opacity: 0.0 | ||
1448 | 78 | asynchronous: false | ||
1449 | 79 | Layout.fillWidth: true | ||
1450 | 80 | Layout.fillHeight: true | ||
1451 | 81 | } | ||
1452 | 82 | } | ||
1453 | 83 | |||
1454 | 84 | Behavior on height { | ||
1455 | 85 | NumberAnimation { | ||
1456 | 86 | id: heightAnimation | ||
1457 | 87 | duration: _animationDuration | ||
1458 | 88 | easing.type: Easing.OutQuad | ||
1459 | 89 | } | ||
1460 | 90 | } | ||
1461 | 91 | |||
1462 | 92 | onTriggered: if (!footer || !selected) messageHeader.shakeIcon(); | ||
1463 | 67 | 93 | ||
1464 | 68 | states: State { | 94 | states: State { |
1465 | 69 | name: "expanded" | 95 | name: "expanded" |
1467 | 70 | when: selected | 96 | when: selected && footerLoader.status == Loader.Ready |
1468 | 71 | 97 | ||
1469 | 72 | PropertyChanges { | 98 | PropertyChanges { |
1476 | 73 | target: menu | 99 | target: footerLoader |
1477 | 74 | implicitHeight: menu.expandedHeight | 100 | opacity: 1.0 |
1472 | 75 | } | ||
1473 | 76 | PropertyChanges { | ||
1474 | 77 | target: background | ||
1475 | 78 | alpha: 0.05 | ||
1478 | 79 | } | 101 | } |
1479 | 80 | } | 102 | } |
1480 | 81 | 103 | ||
1481 | 82 | transitions: Transition { | 104 | transitions: Transition { |
1482 | 83 | ParallelAnimation { | 105 | ParallelAnimation { |
1489 | 84 | NumberAnimation { | 106 | PropertyAnimation { target: footerLoader; property: "opacity"; duration: _animationDuration } |
1484 | 85 | properties: "opacity,implicitHeight" | ||
1485 | 86 | duration: 200 | ||
1486 | 87 | easing.type: Easing.OutQuad | ||
1487 | 88 | } | ||
1488 | 89 | ColorAnimation {} | ||
1490 | 90 | } | 107 | } |
1491 | 91 | } | 108 | } |
1492 | 92 | 109 | ||
1493 | 93 | 110 | ||
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 | 1 | /* | ||
1499 | 2 | * Copyright 2013 Canonical Ltd. | ||
1500 | 3 | * | ||
1501 | 4 | * This program is free software; you can redistribute it and/or modify | ||
1502 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
1503 | 6 | * the Free Software Foundation; version 3. | ||
1504 | 7 | * | ||
1505 | 8 | * This program is distributed in the hope that it will be useful, | ||
1506 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1507 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1508 | 11 | * GNU Lesser General Public License for more details. | ||
1509 | 12 | * | ||
1510 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1511 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1512 | 15 | * | ||
1513 | 16 | * Authors: | ||
1514 | 17 | * Renato Araujo Oliveira Filho <renato@canonical.com> | ||
1515 | 18 | * Olivier Tilloy <olivier.tilloy@canonical.com> | ||
1516 | 19 | */ | ||
1517 | 20 | |||
1518 | 21 | import QtQuick 2.0 | ||
1519 | 22 | import Ubuntu.Components 0.1 | ||
1520 | 23 | |||
1521 | 24 | HeroMessageMenu { | ||
1522 | 25 | id: menu | ||
1523 | 26 | |||
1524 | 27 | property string title: "" | ||
1525 | 28 | property string time: "" | ||
1526 | 29 | property string message: "" | ||
1527 | 30 | |||
1528 | 31 | property alias footer: footerLoader.sourceComponent | ||
1529 | 32 | |||
1530 | 33 | expandedHeight: collapsedHeight + fullMessage.height | ||
1531 | 34 | heroMessageHeader.titleText.text: title | ||
1532 | 35 | heroMessageHeader.subtitleText.text: time | ||
1533 | 36 | heroMessageHeader.bodyText.text: message | ||
1534 | 37 | |||
1535 | 38 | Item { | ||
1536 | 39 | id: fullMessage | ||
1537 | 40 | |||
1538 | 41 | anchors { | ||
1539 | 42 | left: parent.left | ||
1540 | 43 | leftMargin: units.gu(2) | ||
1541 | 44 | right: parent.right | ||
1542 | 45 | rightMargin: units.gu(2) | ||
1543 | 46 | top: heroMessageHeader.bottom | ||
1544 | 47 | } | ||
1545 | 48 | height: childrenRect.height | ||
1546 | 49 | opacity: 0.0 | ||
1547 | 50 | enabled: false | ||
1548 | 51 | |||
1549 | 52 | Label { | ||
1550 | 53 | id: bodyText | ||
1551 | 54 | anchors { | ||
1552 | 55 | top: parent.top | ||
1553 | 56 | left: parent.left | ||
1554 | 57 | right: parent.right | ||
1555 | 58 | } | ||
1556 | 59 | wrapMode: Text.WordWrap | ||
1557 | 60 | elide: Text.ElideRight | ||
1558 | 61 | fontSize: "medium" | ||
1559 | 62 | text: heroMessageHeader.bodyText.text | ||
1560 | 63 | } | ||
1561 | 64 | |||
1562 | 65 | Loader { | ||
1563 | 66 | id: footerLoader | ||
1564 | 67 | |||
1565 | 68 | anchors { | ||
1566 | 69 | top: bodyText.bottom | ||
1567 | 70 | topMargin: item ? units.gu(2) : 0 | ||
1568 | 71 | left: parent.left | ||
1569 | 72 | right: parent.right | ||
1570 | 73 | } | ||
1571 | 74 | height: item ? units.gu(4) : 0 | ||
1572 | 75 | } | ||
1573 | 76 | |||
1574 | 77 | states: State { | ||
1575 | 78 | name: "expanded" | ||
1576 | 79 | when: menu.state === "expanded" | ||
1577 | 80 | |||
1578 | 81 | PropertyChanges { | ||
1579 | 82 | target: heroMessageHeader.bodyText | ||
1580 | 83 | opacity: 0.0 | ||
1581 | 84 | } | ||
1582 | 85 | |||
1583 | 86 | PropertyChanges { | ||
1584 | 87 | target: fullMessage | ||
1585 | 88 | opacity: 1.0 | ||
1586 | 89 | enabled: true | ||
1587 | 90 | } | ||
1588 | 91 | } | ||
1589 | 92 | transitions: Transition { | ||
1590 | 93 | NumberAnimation { | ||
1591 | 94 | property: "opacity" | ||
1592 | 95 | duration: 200 | ||
1593 | 96 | } | ||
1594 | 97 | } | ||
1595 | 98 | } | ||
1596 | 99 | } | ||
1597 | 100 | 0 | ||
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 | 17 | */ | 17 | */ |
1603 | 18 | 18 | ||
1604 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
1608 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
1609 | 21 | import Ubuntu.Settings.Components 0.1 as USC | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
1607 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
1610 | 23 | 22 | ||
1611 | 24 | ListItem.Empty { | 23 | ListItem.Empty { |
1612 | 25 | id: menu | 24 | id: menu |
1613 | @@ -126,10 +125,10 @@ | |||
1614 | 126 | } | 125 | } |
1615 | 127 | height: slider.height | 126 | height: slider.height |
1616 | 128 | 127 | ||
1618 | 129 | USC.IconVisual { | 128 | Icon { |
1619 | 130 | id: leftButton | 129 | id: leftButton |
1620 | 131 | objectName: "leftButton" | 130 | objectName: "leftButton" |
1622 | 132 | visible: status === Image.Ready | 131 | visible: source != "" |
1623 | 133 | anchors.left: row.left | 132 | anchors.left: row.left |
1624 | 134 | anchors.verticalCenter: row.verticalCenter | 133 | anchors.verticalCenter: row.verticalCenter |
1625 | 135 | height: slider.height - units.gu(2) | 134 | height: slider.height - units.gu(2) |
1626 | @@ -182,10 +181,10 @@ | |||
1627 | 182 | } | 181 | } |
1628 | 183 | } | 182 | } |
1629 | 184 | 183 | ||
1631 | 185 | USC.IconVisual { | 184 | Icon { |
1632 | 186 | id: rightButton | 185 | id: rightButton |
1633 | 187 | objectName: "rightButton" | 186 | objectName: "rightButton" |
1635 | 188 | visible: status === Image.Ready | 187 | visible: source != "" |
1636 | 189 | anchors.right: row.right | 188 | anchors.right: row.right |
1637 | 190 | anchors.verticalCenter: row.verticalCenter | 189 | anchors.verticalCenter: row.verticalCenter |
1638 | 191 | height: slider.height - units.gu(2) | 190 | height: slider.height - units.gu(2) |
1639 | 192 | 191 | ||
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 | 19 | */ | 19 | */ |
1645 | 20 | 20 | ||
1646 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 |
1648 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
1649 | 23 | import Ubuntu.Settings.Components 0.1 as USC | 23 | import Ubuntu.Settings.Components 0.1 as USC |
1650 | 24 | import QtQuick.Layouts 1.1 | ||
1651 | 24 | 25 | ||
1653 | 25 | HeroMessageMenu { | 26 | SimpleMessageMenu { |
1654 | 26 | id: menu | 27 | id: menu |
1655 | 27 | 28 | ||
1662 | 28 | property string title: "" | 29 | property bool actionEnabled: true |
1663 | 29 | property string time: "" | 30 | property string actionButtonText: i18n.tr("Call back") |
1658 | 30 | property string message: "" | ||
1659 | 31 | |||
1660 | 32 | property bool activateEnabled: true | ||
1661 | 33 | property alias actionButtonText: actionButton.text | ||
1664 | 34 | 31 | ||
1665 | 35 | property bool replyEnabled: true | 32 | property bool replyEnabled: true |
1675 | 36 | property alias replyMessages: quickreply.messages | 33 | property string replyButtonText: i18n.tr("Send") |
1676 | 37 | property alias replyButtonText: quickreply.buttonText | 34 | |
1677 | 38 | 35 | signal actionActivated | |
1669 | 39 | expandedHeight: collapsedHeight + buttons.height + quickreply.height | ||
1670 | 40 | heroMessageHeader.titleText.text: title | ||
1671 | 41 | heroMessageHeader.subtitleText.text: message | ||
1672 | 42 | heroMessageHeader.bodyText.text: time | ||
1673 | 43 | |||
1674 | 44 | signal activated | ||
1678 | 45 | signal replied(string value) | 36 | signal replied(string value) |
1679 | 46 | 37 | ||
1681 | 47 | Item { | 38 | footer: Item { |
1682 | 48 | id: buttons | 39 | id: buttons |
1683 | 49 | 40 | ||
1792 | 50 | anchors.left: parent.left | 41 | implicitHeight: layout.implicitHeight |
1793 | 51 | anchors.leftMargin: units.gu(2) | 42 | |
1794 | 52 | anchors.right: parent.right | 43 | ColumnLayout { |
1795 | 53 | anchors.rightMargin: units.gu(2) | 44 | id: layout |
1796 | 54 | anchors.top: heroMessageHeader.bottom | 45 | anchors { |
1797 | 55 | anchors.topMargin: units.gu(1) | 46 | left: parent.left |
1798 | 56 | height: units.gu(4) | 47 | right: parent.right |
1799 | 57 | opacity: 0.0 | 48 | } |
1800 | 58 | 49 | spacing: units.gu(1) | |
1801 | 59 | Button { | 50 | |
1802 | 60 | objectName: "messageButton" | 51 | RowLayout { |
1803 | 61 | text: "Message" | 52 | spacing: units.gu(2) |
1804 | 62 | anchors.left: parent.left | 53 | |
1805 | 63 | anchors.top: parent.top | 54 | Button { |
1806 | 64 | anchors.bottom: parent.bottom | 55 | objectName: "messageButton" |
1807 | 65 | width: (parent.width - units.gu(1)) / 2 | 56 | text: i18n.tr("Message") |
1808 | 66 | gradient: UbuntuColors.greyGradient | 57 | Layout.fillWidth: true |
1809 | 67 | 58 | ||
1810 | 68 | onClicked: { | 59 | onClicked: { |
1811 | 69 | if (quickreply.state === "") { | 60 | if (reply.state === "") { |
1812 | 70 | quickreply.state = "expanded"; | 61 | reply.state = "expanded"; |
1813 | 71 | } else { | 62 | } else { |
1814 | 72 | quickreply.state = ""; | 63 | reply.state = ""; |
1815 | 73 | } | 64 | } |
1816 | 74 | } | 65 | } |
1817 | 75 | } | 66 | } |
1818 | 76 | 67 | ||
1819 | 77 | Button { | 68 | Button { |
1820 | 78 | id: actionButton | 69 | id: actionButton |
1821 | 79 | objectName: "actionButton" | 70 | objectName: "actionButton" |
1822 | 80 | text: "Call back" | 71 | enabled: menu.actionEnabled |
1823 | 81 | anchors.right: parent.right | 72 | text: actionButtonText |
1824 | 82 | anchors.top: parent.top | 73 | color: UbuntuColors.green |
1825 | 83 | anchors.bottom: parent.bottom | 74 | Layout.fillWidth: true |
1826 | 84 | width: (parent.width - units.gu(1)) / 2 | 75 | |
1827 | 85 | enabled: menu.activateEnabled | 76 | onClicked: { |
1828 | 86 | 77 | menu.actionActivated(); | |
1829 | 87 | onClicked: { | 78 | } |
1830 | 88 | menu.activated(); | 79 | } |
1831 | 89 | } | 80 | } |
1832 | 90 | } | 81 | |
1833 | 91 | 82 | USC.ActionTextField { | |
1834 | 92 | states: State { | 83 | id: reply |
1835 | 93 | name: "expanded" | 84 | |
1836 | 94 | when: menu.state === "expanded" | 85 | Layout.fillWidth: true |
1837 | 95 | 86 | Layout.fillHeight: true | |
1838 | 96 | PropertyChanges { | 87 | visible: state == "expanded" |
1839 | 97 | target: buttons | 88 | |
1840 | 98 | opacity: 1.0 | 89 | activateEnabled: menu.replyEnabled |
1841 | 99 | } | 90 | buttonText: menu.replyButtonText |
1842 | 100 | } | 91 | |
1843 | 101 | transitions: Transition { | 92 | onActivated: { |
1844 | 102 | NumberAnimation { | 93 | menu.replied(value); |
1845 | 103 | property: "opacity" | 94 | } |
1846 | 104 | duration: 200 | 95 | } |
1739 | 105 | easing.type: Easing.OutQuad | ||
1740 | 106 | } | ||
1741 | 107 | } | ||
1742 | 108 | } | ||
1743 | 109 | |||
1744 | 110 | USC.QuickReply { | ||
1745 | 111 | id: quickreply | ||
1746 | 112 | |||
1747 | 113 | onReplied: { | ||
1748 | 114 | menu.replied(value); | ||
1749 | 115 | } | ||
1750 | 116 | |||
1751 | 117 | messages: "" | ||
1752 | 118 | buttonText: "Send" | ||
1753 | 119 | anchors { | ||
1754 | 120 | top: buttons.bottom | ||
1755 | 121 | topMargin: units.gu(2) | ||
1756 | 122 | left: parent.left | ||
1757 | 123 | right: parent.right | ||
1758 | 124 | } | ||
1759 | 125 | height: 0 | ||
1760 | 126 | opacity: 0.0 | ||
1761 | 127 | enabled: false | ||
1762 | 128 | replyEnabled: menu.replyEnabled | ||
1763 | 129 | messageMargins: __contentsMargins | ||
1764 | 130 | |||
1765 | 131 | states: State { | ||
1766 | 132 | name: "expanded" | ||
1767 | 133 | |||
1768 | 134 | PropertyChanges { | ||
1769 | 135 | target: quickreply | ||
1770 | 136 | height: expandedHeight + units.gu(2) | ||
1771 | 137 | opacity: 1.0 | ||
1772 | 138 | } | ||
1773 | 139 | |||
1774 | 140 | PropertyChanges { | ||
1775 | 141 | target: quickreply | ||
1776 | 142 | enabled: true | ||
1777 | 143 | } | ||
1778 | 144 | } | ||
1779 | 145 | |||
1780 | 146 | transitions: Transition { | ||
1781 | 147 | NumberAnimation { | ||
1782 | 148 | properties: "opacity,height" | ||
1783 | 149 | duration: 200 | ||
1784 | 150 | easing.type: Easing.OutQuad | ||
1785 | 151 | } | ||
1786 | 152 | } | ||
1787 | 153 | } | ||
1788 | 154 | |||
1789 | 155 | onStateChanged: { | ||
1790 | 156 | if (state === "") { | ||
1791 | 157 | quickreply.state = ""; | ||
1847 | 158 | } | 96 | } |
1848 | 159 | } | 97 | } |
1849 | 160 | } | 98 | } |
1850 | 161 | 99 | ||
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 | 15 | */ | 15 | */ |
1856 | 16 | 16 | ||
1857 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.0 |
1861 | 18 | import Ubuntu.Components 0.1 as Components | 18 | import Ubuntu.Components 1.1 |
1862 | 19 | import Ubuntu.Settings.Components 0.1 as USC | 19 | import Ubuntu.Components.ListItems 1.0 as ListItems |
1860 | 20 | import Ubuntu.Components.ListItems 0.1 as ListItems | ||
1863 | 21 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
1864 | 22 | 21 | ||
1865 | 23 | ListItems.Empty { | 22 | ListItems.Empty { |
1866 | @@ -27,9 +26,22 @@ | |||
1867 | 27 | property alias text: label.text | 26 | property alias text: label.text |
1868 | 28 | property alias iconColor: iconVisual.color | 27 | property alias iconColor: iconVisual.color |
1869 | 29 | property alias component: componentLoader.sourceComponent | 28 | property alias component: componentLoader.sourceComponent |
1870 | 29 | property alias foregroundColor: label.color | ||
1871 | 30 | property alias backColor: overlay.color | ||
1872 | 31 | |||
1873 | 32 | Rectangle { | ||
1874 | 33 | id: overlay | ||
1875 | 34 | color: "transparent" | ||
1876 | 35 | visible: color !== "transparent" | ||
1877 | 36 | anchors { | ||
1878 | 37 | left: parent.left | ||
1879 | 38 | right: parent.right | ||
1880 | 39 | top: parent.top | ||
1881 | 40 | } | ||
1882 | 41 | height: menu.height - menu.divider.height | ||
1883 | 42 | } | ||
1884 | 30 | 43 | ||
1885 | 31 | RowLayout { | 44 | RowLayout { |
1886 | 32 | |||
1887 | 33 | anchors { | 45 | anchors { |
1888 | 34 | fill: parent | 46 | fill: parent |
1889 | 35 | leftMargin: menu.__contentsMargins | 47 | leftMargin: menu.__contentsMargins |
1890 | @@ -37,9 +49,9 @@ | |||
1891 | 37 | } | 49 | } |
1892 | 38 | spacing: menu.__contentsMargins | 50 | spacing: menu.__contentsMargins |
1893 | 39 | 51 | ||
1895 | 40 | USC.IconVisual { | 52 | Icon { |
1896 | 41 | id: iconVisual | 53 | id: iconVisual |
1898 | 42 | visible: status == Image.Ready | 54 | visible: source != "" |
1899 | 43 | color: Theme.palette.selected.backgroundText | 55 | color: Theme.palette.selected.backgroundText |
1900 | 44 | 56 | ||
1901 | 45 | readonly property real size: Math.min(units.gu(3), parent.height - menu.__contentsMargins) | 57 | readonly property real size: Math.min(units.gu(3), parent.height - menu.__contentsMargins) |
1902 | @@ -49,18 +61,22 @@ | |||
1903 | 49 | Layout.alignment: Qt.AlignVCenter | 61 | Layout.alignment: Qt.AlignVCenter |
1904 | 50 | } | 62 | } |
1905 | 51 | 63 | ||
1907 | 52 | Components.Label { | 64 | Label { |
1908 | 53 | id: label | 65 | id: label |
1909 | 54 | Layout.fillWidth: true | 66 | Layout.fillWidth: true |
1910 | 55 | Layout.alignment: Qt.AlignVCenter | 67 | Layout.alignment: Qt.AlignVCenter |
1911 | 56 | 68 | ||
1912 | 57 | elide: Text.ElideRight | 69 | elide: Text.ElideRight |
1913 | 58 | maximumLineCount: 1 | 70 | maximumLineCount: 1 |
1914 | 59 | opacity: label.enabled ? 1.0 : 0.5 | ||
1915 | 60 | } | 71 | } |
1916 | 61 | 72 | ||
1917 | 62 | Loader { | 73 | Loader { |
1918 | 63 | id: componentLoader | 74 | id: componentLoader |
1919 | 75 | asynchronous: false | ||
1920 | 76 | visible: status == Loader.Ready | ||
1921 | 77 | |||
1922 | 78 | Layout.preferredHeight: item ? item.height : 0 | ||
1923 | 79 | Layout.preferredWidth: item ? item.width : 0 | ||
1924 | 64 | } | 80 | } |
1925 | 65 | } | 81 | } |
1926 | 66 | } | 82 | } |
1927 | 67 | 83 | ||
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 | 18 | */ | 18 | */ |
1933 | 19 | 19 | ||
1934 | 20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 |
1937 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 1.1 |
1936 | 22 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
1938 | 23 | 22 | ||
1940 | 24 | ListItem.Standard { | 23 | StandardMenu { |
1941 | 25 | id: menu | 24 | id: menu |
1942 | 26 | 25 | ||
1943 | 27 | property bool checked: false | 26 | property bool checked: false |
1960 | 28 | iconFrame: false | 27 | |
1961 | 29 | 28 | onClicked: menu.checked = !menu.checked | |
1962 | 30 | control: Switch { | 29 | |
1963 | 31 | id: switcher | 30 | component: Component { |
1964 | 32 | objectName: "switcher" | 31 | Switch { |
1965 | 33 | property bool enableCheckConnection: true | 32 | id: switcher |
1966 | 34 | 33 | objectName: "switcher" | |
1967 | 35 | Component.onCompleted: { | 34 | property bool enableCheckConnection: true |
1968 | 36 | checked = menu.checked; | 35 | |
1969 | 37 | } | 36 | Component.onCompleted: { |
1970 | 38 | 37 | checked = menu.checked; | |
1955 | 39 | // FIXME : should use Checkbox.toggled signal | ||
1956 | 40 | // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled | ||
1957 | 41 | onCheckedChanged: { | ||
1958 | 42 | if (!enableCheckConnection) { | ||
1959 | 43 | return; | ||
1971 | 44 | } | 38 | } |
1983 | 45 | var oldEnable = enableCheckConnection; | 39 | |
1984 | 46 | enableCheckConnection = false; | 40 | // FIXME : create a bi-directional feedback component |
1974 | 47 | |||
1975 | 48 | menu.checked = checked; | ||
1976 | 49 | menu.triggered(menu.checked); | ||
1977 | 50 | |||
1978 | 51 | enableCheckConnection = oldEnable; | ||
1979 | 52 | } | ||
1980 | 53 | |||
1981 | 54 | Connections { | ||
1982 | 55 | target: menu | ||
1985 | 56 | onCheckedChanged: { | 41 | onCheckedChanged: { |
1987 | 57 | if (!switcher.enableCheckConnection) { | 42 | if (!enableCheckConnection) { |
1988 | 58 | return; | 43 | return; |
1989 | 59 | } | 44 | } |
1996 | 60 | var oldEnable = switcher.enableCheckConnection; | 45 | var oldEnable = enableCheckConnection; |
1997 | 61 | switcher.enableCheckConnection = false; | 46 | enableCheckConnection = false; |
1998 | 62 | 47 | ||
1999 | 63 | switcher.checked = menu.checked; | 48 | menu.checked = checked; |
2000 | 64 | 49 | menu.triggered(menu.checked); | |
2001 | 65 | switcher.enableCheckConnection = oldEnable; | 50 | |
2002 | 51 | enableCheckConnection = oldEnable; | ||
2003 | 52 | } | ||
2004 | 53 | |||
2005 | 54 | Connections { | ||
2006 | 55 | target: menu | ||
2007 | 56 | onCheckedChanged: { | ||
2008 | 57 | if (!switcher.enableCheckConnection) { | ||
2009 | 58 | return; | ||
2010 | 59 | } | ||
2011 | 60 | var oldEnable = switcher.enableCheckConnection; | ||
2012 | 61 | switcher.enableCheckConnection = false; | ||
2013 | 62 | |||
2014 | 63 | switcher.checked = menu.checked; | ||
2015 | 64 | |||
2016 | 65 | switcher.enableCheckConnection = oldEnable; | ||
2017 | 66 | } | ||
2018 | 66 | } | 67 | } |
2019 | 67 | } | 68 | } |
2020 | 68 | } | 69 | } |
2021 | 69 | 70 | ||
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 | 19 | */ | 19 | */ |
2027 | 20 | 20 | ||
2028 | 21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 |
2030 | 22 | import Ubuntu.Components 0.1 | 22 | import Ubuntu.Components 1.1 |
2031 | 23 | import Ubuntu.Settings.Components 0.1 as USC | 23 | import Ubuntu.Settings.Components 0.1 as USC |
2032 | 24 | 24 | ||
2034 | 25 | SimpleTextMessageMenu { | 25 | SimpleMessageMenu { |
2035 | 26 | id: menu | 26 | id: menu |
2036 | 27 | 27 | ||
2037 | 28 | property bool replyEnabled: true | 28 | property bool replyEnabled: true |
2039 | 29 | property string replyButtonText: "Send" | 29 | property string replyButtonText: i18n.tr("Send") |
2040 | 30 | 30 | ||
2041 | 31 | signal replied(string value) | 31 | signal replied(string value) |
2042 | 32 | 32 | ||
2043 | 33 | footer: USC.ActionTextField { | 33 | footer: USC.ActionTextField { |
2044 | 34 | anchors.fill: parent | ||
2045 | 35 | 34 | ||
2046 | 36 | activateEnabled: menu.replyEnabled | 35 | activateEnabled: menu.replyEnabled |
2047 | 37 | buttonText: menu.replyButtonText | 36 | buttonText: menu.replyButtonText |
2048 | 38 | 37 | ||
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 | 17 | */ | 17 | */ |
2054 | 18 | 18 | ||
2055 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
2058 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
2059 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
2060 | 22 | 22 | ||
2062 | 23 | ListItem.Standard { | 23 | StandardMenu { |
2063 | 24 | id: timeZoneMenu | 24 | id: timeZoneMenu |
2064 | 25 | 25 | ||
2065 | 26 | property alias city: timeZoneMenu.text | 26 | property alias city: timeZoneMenu.text |
2067 | 27 | property alias time: timeLabel.text | 27 | property string time |
2068 | 28 | 28 | ||
2072 | 29 | control: Label { | 29 | component: Component { |
2073 | 30 | id: timeLabel | 30 | Label { |
2074 | 31 | objectName: "timeLabel" | 31 | id: timeLabel |
2075 | 32 | objectName: "timeLabel" | ||
2076 | 33 | text: time | ||
2077 | 34 | } | ||
2078 | 32 | } | 35 | } |
2079 | 33 | } | 36 | } |
2080 | 34 | 37 | ||
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 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2086 | 15 | */ | 15 | */ |
2087 | 16 | 16 | ||
2091 | 17 | import QtQuick 2.0 | 17 | import QtQuick 2.1 |
2089 | 18 | import Ubuntu.Components 0.1 | ||
2090 | 19 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
2092 | 20 | import QtQuick.Layouts 1.1 | 18 | import QtQuick.Layouts 1.1 |
2093 | 19 | import Ubuntu.Components 1.1 | ||
2094 | 20 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
2095 | 21 | import Ubuntu.Settings.Components 0.1 | ||
2096 | 21 | 22 | ||
2097 | 22 | ListItem.Empty { | 23 | ListItem.Empty { |
2098 | 23 | id: menu | 24 | id: menu |
2099 | @@ -30,7 +31,7 @@ | |||
2100 | 30 | 31 | ||
2101 | 31 | property alias maximum: progressBar.maximumValue | 32 | property alias maximum: progressBar.maximumValue |
2102 | 32 | 33 | ||
2104 | 33 | implicitHeight: row.height + units.gu(2) | 34 | __height: row.height + units.gu(2) |
2105 | 34 | 35 | ||
2106 | 35 | RowLayout { | 36 | RowLayout { |
2107 | 36 | id: row | 37 | id: row |
2108 | @@ -41,21 +42,23 @@ | |||
2109 | 41 | leftMargin: menu.__contentsMargins | 42 | leftMargin: menu.__contentsMargins |
2110 | 42 | rightMargin: menu.__contentsMargins | 43 | rightMargin: menu.__contentsMargins |
2111 | 43 | } | 44 | } |
2121 | 44 | 45 | spacing: units.gu(2) | |
2122 | 45 | UbuntuShape { | 46 | |
2123 | 46 | id: imageShape | 47 | UbuntuShapeForItem { |
2124 | 47 | Layout.preferredWidth: units.gu(5) | 48 | Layout.preferredWidth: units.gu(6) |
2125 | 48 | Layout.preferredHeight: units.gu(5) | 49 | Layout.preferredHeight: units.gu(6) |
2126 | 49 | 50 | ||
2127 | 50 | Layout.alignment: Qt.AlignTop | 51 | image: icon |
2128 | 51 | 52 | Icon { | |
2129 | 52 | image: Image { | 53 | id: icon |
2130 | 53 | objectName: "icon" | 54 | objectName: "icon" |
2132 | 54 | id: icon | 55 | anchors.fill: parent |
2133 | 55 | 56 | ||
2137 | 56 | sourceSize { | 57 | color: { |
2138 | 57 | width: units.gu(5) | 58 | if (String(source).match(/^image:\/\/theme/)) { |
2139 | 58 | height: units.gu(5) | 59 | return Theme.palette.selected.backgroundText; |
2140 | 60 | } | ||
2141 | 61 | return Qt.rgba(0.0, 0.0, 0.0, 0.0); | ||
2142 | 59 | } | 62 | } |
2143 | 60 | } | 63 | } |
2144 | 61 | } | 64 | } |
2145 | @@ -70,6 +73,7 @@ | |||
2146 | 70 | 73 | ||
2147 | 71 | elide: Text.ElideRight | 74 | elide: Text.ElideRight |
2148 | 72 | maximumLineCount: 1 | 75 | maximumLineCount: 1 |
2149 | 76 | font.weight: Font.DemiBold | ||
2150 | 73 | } | 77 | } |
2151 | 74 | 78 | ||
2152 | 75 | ProgressBar { | 79 | ProgressBar { |
2153 | @@ -77,8 +81,9 @@ | |||
2154 | 77 | objectName: "progress" | 81 | objectName: "progress" |
2155 | 78 | visible: menu.active | 82 | visible: menu.active |
2156 | 79 | value: 0.0 | 83 | value: 0.0 |
2157 | 84 | showProgressPercentage: false | ||
2158 | 80 | 85 | ||
2160 | 81 | Layout.preferredHeight: units.gu(2) | 86 | Layout.preferredHeight: units.gu(1) |
2161 | 82 | Layout.fillWidth: true | 87 | Layout.fillWidth: true |
2162 | 83 | } | 88 | } |
2163 | 84 | 89 | ||
2164 | @@ -88,6 +93,7 @@ | |||
2165 | 88 | Layout.fillWidth: true | 93 | Layout.fillWidth: true |
2166 | 89 | visible: menu.active | 94 | visible: menu.active |
2167 | 90 | 95 | ||
2168 | 96 | fontSize: "x-small" | ||
2169 | 91 | elide: Text.ElideRight | 97 | elide: Text.ElideRight |
2170 | 92 | maximumLineCount: 1 | 98 | maximumLineCount: 1 |
2171 | 93 | } | 99 | } |
2172 | 94 | 100 | ||
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 | 17 | */ | 17 | */ |
2178 | 18 | 18 | ||
2179 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
2182 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
2183 | 21 | import Ubuntu.Components.ListItems 0.1 as ListItem | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem |
2184 | 22 | 22 | ||
2186 | 23 | ListItem.Standard { | 23 | StandardMenu { |
2187 | 24 | id: userSessionMenu | 24 | id: userSessionMenu |
2188 | 25 | 25 | ||
2189 | 26 | property alias name: userSessionMenu.text | 26 | property alias name: userSessionMenu.text |
2206 | 27 | property alias active: activeIcon.visible | 27 | property bool active: false |
2207 | 28 | 28 | ||
2208 | 29 | control: Rectangle { | 29 | component: Component { |
2209 | 30 | id: activeIcon | 30 | Rectangle { |
2210 | 31 | objectName: "activeIcon" | 31 | id: activeIcon |
2211 | 32 | width: checkMark.width + units.gu(1.5) | 32 | objectName: "activeIcon" |
2212 | 33 | height: checkMark.height + units.gu(1.5) | 33 | width: checkMark.width + units.gu(1.5) |
2213 | 34 | radius: width / 2 | 34 | height: checkMark.height + units.gu(1.5) |
2214 | 35 | antialiasing: true | 35 | radius: width / 2 |
2215 | 36 | color: Theme.palette.normal.backgroundText | 36 | antialiasing: true |
2216 | 37 | visible: false | 37 | color: Theme.palette.normal.backgroundText |
2217 | 38 | 38 | visible: userSessionMenu.active | |
2218 | 39 | Image { | 39 | |
2219 | 40 | id: checkMark | 40 | Image { |
2220 | 41 | source: "artwork/CheckMark.png" | 41 | id: checkMark |
2221 | 42 | anchors.centerIn: parent | 42 | source: "image://theme/tick" |
2222 | 43 | height: units.gu(2) | ||
2223 | 44 | width: height | ||
2224 | 45 | anchors.centerIn: parent | ||
2225 | 46 | |||
2226 | 47 | sourceSize { | ||
2227 | 48 | height: height | ||
2228 | 49 | width: width | ||
2229 | 50 | } | ||
2230 | 51 | } | ||
2231 | 43 | } | 52 | } |
2232 | 44 | } | 53 | } |
2233 | 45 | } | 54 | } |
2234 | 46 | 55 | ||
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 | 1 | # export the artwork files. | ||
2241 | 2 | export_qmlfiles(Ubuntu.Settings.Menus.Art Ubuntu/Settings/Menus/artwork DESTINATION ${QT_IMPORTS_DIR}) | ||
2242 | 3 | 0 | ||
2243 | === removed file 'Ubuntu/Settings/Menus/artwork/CheckMark@18.png' | |||
2244 | 4 | Binary 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 | 1 | Binary 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 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2250 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
2251 | 3 | <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 | 4 | <defs id="defs15139"> | ||
2253 | 5 | <radialGradient id="radialGradient2612" gradientUnits="userSpaceOnUse" cy="4.625" cx="62.625" gradientTransform="matrix(1 0 0 .34118 0 3.0471)" r="10.625"> | ||
2254 | 6 | <stop id="stop8840" offset="0"/> | ||
2255 | 7 | <stop id="stop8842" style="stop-opacity:0" offset="1"/> | ||
2256 | 8 | </radialGradient> | ||
2257 | 9 | <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 | 10 | <stop id="stop4875" style="stop-color:#fff" offset="0"/> | ||
2259 | 11 | <stop id="stop4877" style="stop-color:#fff;stop-opacity:0" offset="1"/> | ||
2260 | 12 | </linearGradient> | ||
2261 | 13 | <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 | 14 | <stop id="stop8649" style="stop-color:#8fb1dc" offset="0"/> | ||
2263 | 15 | <stop id="stop8651" style="stop-color:#3465a4" offset="1"/> | ||
2264 | 16 | </radialGradient> | ||
2265 | 17 | <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 | 18 | <stop id="stop4847" style="stop-color:#fff" offset="0"/> | ||
2267 | 19 | <stop id="stop4849" style="stop-color:#b6b6b6" offset="1"/> | ||
2268 | 20 | </radialGradient> | ||
2269 | 21 | <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 | 22 | <stop id="stop14112" style="stop-color:#557695" offset="0"/> | ||
2271 | 23 | <stop id="stop14114" style="stop-color:#15395c" offset="1"/> | ||
2272 | 24 | </radialGradient> | ||
2273 | 25 | <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 | 26 | <stop id="stop14118" style="stop-color:#9e9e9e" offset="0"/> | ||
2275 | 27 | <stop id="stop14120" style="stop-color:#9e9e9e;stop-opacity:0" offset="1"/> | ||
2276 | 28 | </radialGradient> | ||
2277 | 29 | </defs> | ||
2278 | 30 | <g id="layer1"> | ||
2279 | 31 | <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 | 32 | <g id="g15122" transform="translate(.79042 -.78563)"> | ||
2281 | 33 | <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 | 34 | <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 | 35 | <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 | 36 | </g> | ||
2285 | 37 | <g id="g2414" transform="matrix(.99991 -.013701 .013701 .99991 -.28870 .53585)"> | ||
2286 | 38 | <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 | 39 | <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 | 40 | </g> | ||
2289 | 41 | </g> | ||
2290 | 42 | </svg> | ||
2291 | 43 | 0 | ||
2292 | === removed file 'Ubuntu/Settings/Menus/artwork/default_contact.png' | |||
2293 | 44 | Binary 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 | 1 | Binary 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 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2299 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
2300 | 3 | |||
2301 | 4 | <svg | ||
2302 | 5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
2303 | 6 | xmlns:cc="http://creativecommons.org/ns#" | ||
2304 | 7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
2305 | 8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
2306 | 9 | xmlns="http://www.w3.org/2000/svg" | ||
2307 | 10 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
2308 | 11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
2309 | 12 | width="64" | ||
2310 | 13 | height="64" | ||
2311 | 14 | id="svg2986" | ||
2312 | 15 | version="1.1" | ||
2313 | 16 | inkscape:version="0.48.4 r9939" | ||
2314 | 17 | sodipodi:docname="secure.svg"> | ||
2315 | 18 | <defs | ||
2316 | 19 | id="defs2988" /> | ||
2317 | 20 | <sodipodi:namedview | ||
2318 | 21 | id="base" | ||
2319 | 22 | pagecolor="#ffffff" | ||
2320 | 23 | bordercolor="#666666" | ||
2321 | 24 | borderopacity="1.0" | ||
2322 | 25 | inkscape:pageopacity="0.0" | ||
2323 | 26 | inkscape:pageshadow="2" | ||
2324 | 27 | inkscape:zoom="7.9180415" | ||
2325 | 28 | inkscape:cx="7.5048745" | ||
2326 | 29 | inkscape:cy="29.401628" | ||
2327 | 30 | inkscape:current-layer="layer1" | ||
2328 | 31 | showgrid="true" | ||
2329 | 32 | inkscape:grid-bbox="true" | ||
2330 | 33 | inkscape:document-units="px" | ||
2331 | 34 | inkscape:snap-grids="false" | ||
2332 | 35 | inkscape:window-width="1549" | ||
2333 | 36 | inkscape:window-height="876" | ||
2334 | 37 | inkscape:window-x="51" | ||
2335 | 38 | inkscape:window-y="24" | ||
2336 | 39 | inkscape:window-maximized="1"> | ||
2337 | 40 | <inkscape:grid | ||
2338 | 41 | type="xygrid" | ||
2339 | 42 | id="grid3012" | ||
2340 | 43 | empspacing="5" | ||
2341 | 44 | visible="true" | ||
2342 | 45 | enabled="true" | ||
2343 | 46 | snapvisiblegridlinesonly="true" /> | ||
2344 | 47 | </sodipodi:namedview> | ||
2345 | 48 | <metadata | ||
2346 | 49 | id="metadata2991"> | ||
2347 | 50 | <rdf:RDF> | ||
2348 | 51 | <cc:Work | ||
2349 | 52 | rdf:about=""> | ||
2350 | 53 | <dc:format>image/svg+xml</dc:format> | ||
2351 | 54 | <dc:type | ||
2352 | 55 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
2353 | 56 | <dc:title /> | ||
2354 | 57 | </cc:Work> | ||
2355 | 58 | </rdf:RDF> | ||
2356 | 59 | </metadata> | ||
2357 | 60 | <g | ||
2358 | 61 | id="layer1" | ||
2359 | 62 | inkscape:label="Layer 1" | ||
2360 | 63 | inkscape:groupmode="layer" | ||
2361 | 64 | transform="translate(0,32)"> | ||
2362 | 65 | <path | ||
2363 | 66 | inkscape:connector-curvature="0" | ||
2364 | 67 | 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 | 68 | style="fill:#dfdbd2;fill-rule:evenodd" | ||
2366 | 69 | id="path8" /> | ||
2367 | 70 | </g> | ||
2368 | 71 | </svg> | ||
2369 | 72 | 0 | ||
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 | 14 | ProgressValueMenu 0.1 ProgressValueMenu.qml | 14 | ProgressValueMenu 0.1 ProgressValueMenu.qml |
2375 | 15 | SectionMenu 0.1 SectionMenu.qml | 15 | SectionMenu 0.1 SectionMenu.qml |
2376 | 16 | SeparatorMenu 0.1 SeparatorMenu.qml | 16 | SeparatorMenu 0.1 SeparatorMenu.qml |
2378 | 17 | SimpleTextMessageMenu 0.1 SimpleTextMessageMenu.qml | 17 | SimpleMessageMenu 0.1 SimpleMessageMenu.qml |
2379 | 18 | SliderMenu 0.1 SliderMenu.qml | 18 | SliderMenu 0.1 SliderMenu.qml |
2380 | 19 | SnapDecisionMenu 0.1 SnapDecisionMenu.qml | 19 | SnapDecisionMenu 0.1 SnapDecisionMenu.qml |
2381 | 20 | StandardMenu 0.1 StandardMenu.qml | 20 | StandardMenu 0.1 StandardMenu.qml |
2382 | @@ -23,5 +23,3 @@ | |||
2383 | 23 | TimeZoneMenu 0.1 TimeZoneMenu.qml | 23 | TimeZoneMenu 0.1 TimeZoneMenu.qml |
2384 | 24 | TransferMenu 0.1 TransferMenu.qml | 24 | TransferMenu 0.1 TransferMenu.qml |
2385 | 25 | UserSessionMenu 0.1 UserSessionMenu.qml | 25 | UserSessionMenu 0.1 UserSessionMenu.qml |
2386 | 26 | |||
2387 | 27 | internal HeroMessageMenu HeroMessageMenu.qml | ||
2388 | 28 | 26 | ||
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 | 5 | 5 | ||
2394 | 6 | -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 18 Sep 2014 09:48:32 +0000 | 6 | -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 18 Sep 2014 09:48:32 +0000 |
2395 | 7 | 7 | ||
2396 | 8 | ubuntu-settings-components (0.4-0ubuntu1) UNRELEASED; urgency=medium | ||
2397 | 9 | |||
2398 | 10 | [ Nick Dedekind ] | ||
2399 | 11 | |||
2400 | 12 | * Updated components UI for design review | ||
2401 | 13 | |||
2402 | 14 | -- Nicholas Dedekind <nicholas.dedekind@gmail.com> Thu, 31 Jul 2014 17:57:51 +0100 | ||
2403 | 15 | |||
2404 | 8 | ubuntu-settings-components (0.3+14.10.20140708-0ubuntu1) utopic; urgency=medium | 16 | ubuntu-settings-components (0.3+14.10.20140708-0ubuntu1) utopic; urgency=medium |
2405 | 9 | 17 | ||
2406 | 10 | [ Nick Dedekind ] | 18 | [ Nick Dedekind ] |
2407 | 11 | 19 | ||
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 | 12 | qtdeclarative5-dev-tools, | 12 | qtdeclarative5-dev-tools, |
2413 | 13 | qtdeclarative5-qtquick2-plugin, | 13 | qtdeclarative5-qtquick2-plugin, |
2414 | 14 | qtdeclarative5-test-plugin, | 14 | qtdeclarative5-test-plugin, |
2416 | 15 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48), | 15 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1), |
2417 | 16 | suru-icon-theme, | 16 | suru-icon-theme, |
2418 | 17 | Standards-Version: 3.9.4 | 17 | Standards-Version: 3.9.4 |
2419 | 18 | Homepage: https://launchpad.net/ubuntu-settings-components | 18 | Homepage: https://launchpad.net/ubuntu-settings-components |
2420 | @@ -26,7 +26,7 @@ | |||
2421 | 26 | Multi-Arch: same | 26 | Multi-Arch: same |
2422 | 27 | Pre-Depends: dpkg (>= 1.15.6~) | 27 | Pre-Depends: dpkg (>= 1.15.6~) |
2423 | 28 | Depends: qml-module-qtquick-layouts, | 28 | Depends: qml-module-qtquick-layouts, |
2425 | 29 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48), | 29 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1), |
2426 | 30 | suru-icon-theme, | 30 | suru-icon-theme, |
2427 | 31 | ${misc:Depends}, | 31 | ${misc:Depends}, |
2428 | 32 | ${shlibs:Depends}, | 32 | ${shlibs:Depends}, |
2429 | 33 | 33 | ||
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 | 1 | file(GLOB QML_JS_FILES *.qml *.js) | ||
2436 | 2 | add_custom_target( ExampleQmlFiles SOURCES ${QML_JS_FILES} ) | ||
2437 | 0 | 3 | ||
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 | 1 | /* | ||
2443 | 2 | * Copyright 2014 Canonical Ltd. | ||
2444 | 3 | * | ||
2445 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2446 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2447 | 6 | * the Free Software Foundation; version 3. | ||
2448 | 7 | * | ||
2449 | 8 | * This program is distributed in the hope that it will be useful, | ||
2450 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2451 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2452 | 11 | * GNU Lesser General Public License for more details. | ||
2453 | 12 | * | ||
2454 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2455 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2456 | 15 | * | ||
2457 | 16 | * Authored by Andrea Cimitan <andrea.cimitan@canonical.com> | ||
2458 | 17 | */ | ||
2459 | 18 | |||
2460 | 19 | import QtQuick 2.0 | ||
2461 | 20 | import Ubuntu.Components 1.1 | ||
2462 | 21 | import Ubuntu.Settings.Components 0.1 | ||
2463 | 22 | import Ubuntu.Settings.Menus 0.1 | ||
2464 | 23 | |||
2465 | 24 | Item { | ||
2466 | 25 | property string title: "MessageComponents" | ||
2467 | 26 | |||
2468 | 27 | width: units.gu(42) | ||
2469 | 28 | height: units.gu(75) | ||
2470 | 29 | |||
2471 | 30 | ListModel { | ||
2472 | 31 | id: model | ||
2473 | 32 | ListElement { | ||
2474 | 33 | type: "text" | ||
2475 | 34 | title: "Text Message" | ||
2476 | 35 | 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 | 36 | time: "Sat 31 Oct, 11:00" | ||
2478 | 37 | icon: "image://theme/message" | ||
2479 | 38 | avatar: "image://theme/contact" | ||
2480 | 39 | } | ||
2481 | 40 | ListElement { | ||
2482 | 41 | type: "simple" | ||
2483 | 42 | title: "Simple Text Message Simple" | ||
2484 | 43 | body: "I happen to be tall and thin! But let's try a new line" | ||
2485 | 44 | time: "Yesterday, 10:00" | ||
2486 | 45 | icon: "image://theme/message" | ||
2487 | 46 | avatar: "artwork/beach.jpg" | ||
2488 | 47 | } | ||
2489 | 48 | ListElement { | ||
2490 | 49 | type: "snap" | ||
2491 | 50 | title: "Snap Decision" | ||
2492 | 51 | body: "My mother says I'm handsome!" | ||
2493 | 52 | time: "10:30am" | ||
2494 | 53 | icon: "image://theme/missed-call" | ||
2495 | 54 | avatar: "artwork/night.jpg" | ||
2496 | 55 | } | ||
2497 | 56 | } | ||
2498 | 57 | |||
2499 | 58 | ListView { | ||
2500 | 59 | model: model | ||
2501 | 60 | anchors.fill: parent | ||
2502 | 61 | |||
2503 | 62 | cacheBuffer: 10000 | ||
2504 | 63 | |||
2505 | 64 | delegate: Loader { | ||
2506 | 65 | anchors { | ||
2507 | 66 | left: parent.left | ||
2508 | 67 | right: parent.right | ||
2509 | 68 | } | ||
2510 | 69 | asynchronous: true | ||
2511 | 70 | sourceComponent: model.type === "simple" ? simple : | ||
2512 | 71 | model.type === "text" ? text : | ||
2513 | 72 | model.type === "snap" ? snap : undefined | ||
2514 | 73 | |||
2515 | 74 | Component { | ||
2516 | 75 | id: simple | ||
2517 | 76 | SimpleMessageMenu { | ||
2518 | 77 | avatar: model.avatar | ||
2519 | 78 | icon: model.icon | ||
2520 | 79 | title: model.title | ||
2521 | 80 | body: model.body | ||
2522 | 81 | time: model.time | ||
2523 | 82 | removable: true | ||
2524 | 83 | } | ||
2525 | 84 | } | ||
2526 | 85 | |||
2527 | 86 | Component { | ||
2528 | 87 | id: text | ||
2529 | 88 | TextMessageMenu { | ||
2530 | 89 | avatar: model.avatar | ||
2531 | 90 | icon: model.icon | ||
2532 | 91 | title: model.title | ||
2533 | 92 | body: model.body | ||
2534 | 93 | time: model.time | ||
2535 | 94 | removable: true | ||
2536 | 95 | |||
2537 | 96 | onTriggered: { | ||
2538 | 97 | selected = !selected; | ||
2539 | 98 | } | ||
2540 | 99 | } | ||
2541 | 100 | } | ||
2542 | 101 | |||
2543 | 102 | Component { | ||
2544 | 103 | id: snap | ||
2545 | 104 | SnapDecisionMenu { | ||
2546 | 105 | avatar: model.avatar | ||
2547 | 106 | icon: model.icon | ||
2548 | 107 | title: model.title | ||
2549 | 108 | body: model.body | ||
2550 | 109 | time: model.time | ||
2551 | 110 | removable: true | ||
2552 | 111 | |||
2553 | 112 | onTriggered: { | ||
2554 | 113 | selected = !selected; | ||
2555 | 114 | } | ||
2556 | 115 | } | ||
2557 | 116 | } | ||
2558 | 117 | } | ||
2559 | 118 | } | ||
2560 | 119 | } | ||
2561 | 0 | 120 | ||
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 | 1 | /* | ||
2567 | 2 | * Copyright 2013 Canonical Ltd. | ||
2568 | 3 | * | ||
2569 | 4 | * This program is free software; you can redistribute it and/or modify | ||
2570 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
2571 | 6 | * the Free Software Foundation; version 3. | ||
2572 | 7 | * | ||
2573 | 8 | * This program is distributed in the hope that it will be useful, | ||
2574 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2575 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2576 | 11 | * GNU Lesser General Public License for more details. | ||
2577 | 12 | * | ||
2578 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
2579 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2580 | 15 | * | ||
2581 | 16 | * Authored by Andrea Cimitan <andrea.cimitan@canonical.com> | ||
2582 | 17 | */ | ||
2583 | 18 | |||
2584 | 19 | import QtQuick 2.0 | ||
2585 | 20 | import Ubuntu.Components 1.1 | ||
2586 | 21 | import Ubuntu.Settings.Components 0.1 | ||
2587 | 22 | import Ubuntu.Settings.Menus 0.1 | ||
2588 | 23 | |||
2589 | 24 | Item { | ||
2590 | 25 | property string title: "Settings Components" | ||
2591 | 26 | |||
2592 | 27 | ListModel { | ||
2593 | 28 | id: mediaPlayerModel | ||
2594 | 29 | ListElement { song: "You're The First, The Last, My Everything"; artist: "Barry White"; album: "Hot Soul"; albumArt: "artwork/beach.jpg"} | ||
2595 | 30 | ListElement { song: "Stony Ground"; artist: "Richard Thompson"; album: "Electric"; albumArt: "artwork/farm.jpg"} | ||
2596 | 31 | ListElement { song: "Los Robots"; artist: "Kraftwerk"; album: "The Man-Machine"; albumArt: "artwork/insane.jpg"} | ||
2597 | 32 | } | ||
2598 | 33 | |||
2599 | 34 | ListModel { | ||
2600 | 35 | id: timeZoneModel | ||
2601 | 36 | ListElement { city: "San Francisco"; time: "3:00am" } | ||
2602 | 37 | ListElement { city: "London"; time: "11:00am" } | ||
2603 | 38 | ListElement { city: "Rome"; time: "12:00am" } | ||
2604 | 39 | } | ||
2605 | 40 | |||
2606 | 41 | ListModel { | ||
2607 | 42 | id: eventModel | ||
2608 | 43 | ListElement { icon: "image://theme/calendar"; eventColor: "yellow"; text: "Lunch with Lola"; time: "1:10 PM" } | ||
2609 | 44 | ListElement { icon: "image://theme/calendar"; eventColor: "green"; text: "Gym"; time: "6:30 PM" } | ||
2610 | 45 | ListElement { icon: "image://theme/calendar"; eventColor: "red"; text: "Birthday Party"; time: "9:00 PM" } | ||
2611 | 46 | } | ||
2612 | 47 | |||
2613 | 48 | Flickable { | ||
2614 | 49 | id: flickable | ||
2615 | 50 | |||
2616 | 51 | anchors.fill: parent | ||
2617 | 52 | contentWidth: column.width | ||
2618 | 53 | contentHeight: column.height | ||
2619 | 54 | |||
2620 | 55 | Column { | ||
2621 | 56 | id: column | ||
2622 | 57 | |||
2623 | 58 | width: flickable.width | ||
2624 | 59 | height: childrenRect.height | ||
2625 | 60 | |||
2626 | 61 | StandardMenu { | ||
2627 | 62 | text: i18n.tr("Standard Menu\nLook at me, I'm a new line.") | ||
2628 | 63 | } | ||
2629 | 64 | |||
2630 | 65 | StandardMenu { | ||
2631 | 66 | iconSource: "image://theme/calendar" | ||
2632 | 67 | iconColor: "red" | ||
2633 | 68 | text: i18n.tr("Standard Menu") | ||
2634 | 69 | component: Component { | ||
2635 | 70 | Button { | ||
2636 | 71 | text: "Press Me" | ||
2637 | 72 | } | ||
2638 | 73 | } | ||
2639 | 74 | backColor: Qt.rgba(1,1,1,0.1) | ||
2640 | 75 | } | ||
2641 | 76 | |||
2642 | 77 | SliderMenu { | ||
2643 | 78 | id: slider | ||
2644 | 79 | text: i18n.tr("Slider") | ||
2645 | 80 | minimumValue: 0 | ||
2646 | 81 | maximumValue: 100 | ||
2647 | 82 | value: 20 | ||
2648 | 83 | |||
2649 | 84 | minIcon: "image://theme/audio-volume-low" | ||
2650 | 85 | maxIcon: "image://theme/audio-volume-high" | ||
2651 | 86 | } | ||
2652 | 87 | |||
2653 | 88 | ProgressBarMenu { | ||
2654 | 89 | text: i18n.tr("ProgressBar") | ||
2655 | 90 | value: slider.value | ||
2656 | 91 | minimumValue: 0 | ||
2657 | 92 | maximumValue: 100 | ||
2658 | 93 | } | ||
2659 | 94 | |||
2660 | 95 | ProgressValueMenu { | ||
2661 | 96 | text: i18n.tr("ProgressValue") | ||
2662 | 97 | value: slider.value | ||
2663 | 98 | } | ||
2664 | 99 | |||
2665 | 100 | ButtonMenu { | ||
2666 | 101 | text: i18n.tr("Button") | ||
2667 | 102 | buttonText: i18n.tr("Hello world!") | ||
2668 | 103 | } | ||
2669 | 104 | |||
2670 | 105 | CheckableMenu { | ||
2671 | 106 | text: i18n.tr("Checkable") | ||
2672 | 107 | checked: true | ||
2673 | 108 | } | ||
2674 | 109 | |||
2675 | 110 | SwitchMenu { | ||
2676 | 111 | text: i18n.tr("Switch") | ||
2677 | 112 | checked: true | ||
2678 | 113 | } | ||
2679 | 114 | |||
2680 | 115 | SectionMenu { | ||
2681 | 116 | text: i18n.tr("Section Starts Here") | ||
2682 | 117 | busy: true | ||
2683 | 118 | } | ||
2684 | 119 | |||
2685 | 120 | SeparatorMenu {} | ||
2686 | 121 | |||
2687 | 122 | CalendarMenu { | ||
2688 | 123 | id: calendar | ||
2689 | 124 | } | ||
2690 | 125 | |||
2691 | 126 | UserSessionMenu { | ||
2692 | 127 | name: i18n.tr("Lola Chang") | ||
2693 | 128 | iconSource: "image://theme/contact" | ||
2694 | 129 | active: true | ||
2695 | 130 | } | ||
2696 | 131 | |||
2697 | 132 | MediaPlayerMenu { | ||
2698 | 133 | id: mediaPlayer | ||
2699 | 134 | property int index: 0 | ||
2700 | 135 | |||
2701 | 136 | playerName: "Rhythmbox" | ||
2702 | 137 | playerIcon: Qt.resolvedUrl("../tests/artwork/rhythmbox.png") | ||
2703 | 138 | albumArt: mediaPlayerModel.get(index).albumArt; | ||
2704 | 139 | song: mediaPlayerModel.get(index).song; | ||
2705 | 140 | artist: mediaPlayerModel.get(index).artist; | ||
2706 | 141 | album: mediaPlayerModel.get(index).album; | ||
2707 | 142 | showTrack: mediaControl.playing | ||
2708 | 143 | } | ||
2709 | 144 | |||
2710 | 145 | PlaybackItemMenu { | ||
2711 | 146 | id: mediaControl | ||
2712 | 147 | canPlay: true | ||
2713 | 148 | canGoNext: mediaPlayer.index < mediaPlayerModel.count - 1 | ||
2714 | 149 | canGoPrevious: mediaPlayer.index > 0 | ||
2715 | 150 | playing: false | ||
2716 | 151 | |||
2717 | 152 | onPrevious: mediaPlayer.index = Math.max(mediaPlayer.index - 1, 0) | ||
2718 | 153 | onNext: mediaPlayer.index = Math.min(mediaPlayer.index + 1, mediaPlayerModel.count - 1) | ||
2719 | 154 | onPlay: { playing = !playing; } | ||
2720 | 155 | } | ||
2721 | 156 | |||
2722 | 157 | AccessPointMenu { | ||
2723 | 158 | active: true | ||
2724 | 159 | secure: true | ||
2725 | 160 | adHoc: false | ||
2726 | 161 | signalStrength: 50 | ||
2727 | 162 | text: "Access Point" | ||
2728 | 163 | |||
2729 | 164 | onTriggered: active = !active | ||
2730 | 165 | } | ||
2731 | 166 | |||
2732 | 167 | GroupedMessageMenu { | ||
2733 | 168 | text: "Group Message" | ||
2734 | 169 | count: "4100" | ||
2735 | 170 | } | ||
2736 | 171 | |||
2737 | 172 | Column { | ||
2738 | 173 | anchors { | ||
2739 | 174 | left: parent.left | ||
2740 | 175 | right: parent.right | ||
2741 | 176 | } | ||
2742 | 177 | |||
2743 | 178 | Repeater { | ||
2744 | 179 | model: timeZoneModel | ||
2745 | 180 | |||
2746 | 181 | TimeZoneMenu { | ||
2747 | 182 | city: model.city | ||
2748 | 183 | time: model.time | ||
2749 | 184 | } | ||
2750 | 185 | } | ||
2751 | 186 | } | ||
2752 | 187 | |||
2753 | 188 | Column { | ||
2754 | 189 | anchors { | ||
2755 | 190 | left: parent.left | ||
2756 | 191 | right: parent.right | ||
2757 | 192 | } | ||
2758 | 193 | |||
2759 | 194 | Repeater { | ||
2760 | 195 | model: eventModel | ||
2761 | 196 | |||
2762 | 197 | EventMenu { | ||
2763 | 198 | iconSource: model.icon | ||
2764 | 199 | text: model.text | ||
2765 | 200 | eventColor: model.eventColor | ||
2766 | 201 | time: model.time | ||
2767 | 202 | enabled: false | ||
2768 | 203 | } | ||
2769 | 204 | } | ||
2770 | 205 | } | ||
2771 | 206 | |||
2772 | 207 | Row { | ||
2773 | 208 | anchors { | ||
2774 | 209 | left: parent.left | ||
2775 | 210 | right: parent.right | ||
2776 | 211 | } | ||
2777 | 212 | |||
2778 | 213 | spacing: units.gu(1) | ||
2779 | 214 | |||
2780 | 215 | Label { | ||
2781 | 216 | text: "StatusIcon" | ||
2782 | 217 | anchors.verticalCenter: parent.verticalCenter | ||
2783 | 218 | } | ||
2784 | 219 | |||
2785 | 220 | StatusIcon { | ||
2786 | 221 | height: units.gu(5) | ||
2787 | 222 | source: "image://theme/gps" | ||
2788 | 223 | } | ||
2789 | 224 | |||
2790 | 225 | StatusIcon { | ||
2791 | 226 | height: units.gu(5) | ||
2792 | 227 | source: "image://theme/battery-caution" | ||
2793 | 228 | } | ||
2794 | 229 | |||
2795 | 230 | StatusIcon { | ||
2796 | 231 | height: units.gu(5) | ||
2797 | 232 | source: "image://theme/missing,gpm-battery-000-charging" | ||
2798 | 233 | } | ||
2799 | 234 | } | ||
2800 | 235 | } | ||
2801 | 236 | } | ||
2802 | 237 | } | ||
2803 | 0 | 238 | ||
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 | 17 | */ | 17 | */ |
2809 | 18 | 18 | ||
2810 | 19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 |
2812 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 1.1 |
2813 | 21 | import Ubuntu.Settings.Components 0.1 | 21 | import Ubuntu.Settings.Components 0.1 |
2814 | 22 | import Ubuntu.Settings.Menus 0.1 | 22 | import Ubuntu.Settings.Menus 0.1 |
2815 | 23 | 23 | ||
2816 | 24 | MainView { | 24 | MainView { |
2817 | 25 | id: mainView | ||
2818 | 25 | // Note! applicationName needs to match the .desktop filename | 26 | // Note! applicationName needs to match the .desktop filename |
2819 | 26 | applicationName: "SettingsComponents" | 27 | applicationName: "SettingsComponents" |
2820 | 27 | 28 | ||
2821 | 28 | width: units.gu(42) | 29 | width: units.gu(42) |
2822 | 29 | height: units.gu(75) | 30 | height: units.gu(75) |
2823 | 30 | 31 | ||
2843 | 31 | ListModel { | 32 | Component.onCompleted: { |
2844 | 32 | id: mediaPlayerModel | 33 | Theme.name = "Ubuntu.Components.Themes.SuruGradient" |
2845 | 33 | ListElement { song: "Mine"; artist: "Taylor Swift"; album: "Speak Now"; albumArt: "tests/artwork/speak-now.jpg"} | 34 | } |
2846 | 34 | ListElement { song: "Stony Ground"; artist: "Richard Thompson"; album: "Electric"; albumArt: "tests/artwork/electric.jpg"} | 35 | |
2847 | 35 | ListElement { song: "Los Robots"; artist: "Kraftwerk"; album: "The Man-Machine"; albumArt: "tests/artwork/the-man-machine.jpg"} | 36 | ListModel { |
2848 | 36 | } | 37 | id: pages |
2849 | 37 | 38 | ListElement { source: "OtherComponents.qml" } | |
2850 | 38 | ListModel { | 39 | ListElement { source: "MessageComponents.qml" } |
2851 | 39 | id: timeZoneModel | 40 | ListElement { source: "TransferComponents.qml" } |
2833 | 40 | ListElement { city: "San Francisco"; time: "3:00am" } | ||
2834 | 41 | ListElement { city: "London"; time: "11:00am" } | ||
2835 | 42 | ListElement { city: "Rome"; time: "12:00am" } | ||
2836 | 43 | } | ||
2837 | 44 | |||
2838 | 45 | ListModel { | ||
2839 | 46 | id: eventModel | ||
2840 | 47 | ListElement { icon: "image://theme/calendar"; eventColor: "yellow"; text: "Lunch with Lola"; time: "1:10 PM" } | ||
2841 | 48 | ListElement { icon: "image://theme/calendar"; eventColor: "green"; text: "Gym"; time: "6:30 PM" } | ||
2842 | 49 | ListElement { icon: "image://theme/calendar"; eventColor: "red"; text: "Birthday Party"; time: "9:00 PM" } | ||
2852 | 50 | } | 41 | } |
2853 | 51 | 42 | ||
2854 | 52 | Page { | 43 | Page { |
2860 | 53 | title: "SettingsComponents" | 44 | title: listView.currentItem ? listView.currentItem.item.title : "Components" |
2861 | 54 | 45 | clip: true | |
2862 | 55 | Flickable { | 46 | |
2863 | 56 | id: flickable | 47 | ListView { |
2864 | 57 | 48 | id: listView | |
2865 | 49 | model: pages | ||
2866 | 58 | anchors.fill: parent | 50 | anchors.fill: parent |
3096 | 59 | contentWidth: column.width | 51 | |
3097 | 60 | contentHeight: column.height | 52 | orientation: ListView.Horizontal |
3098 | 61 | 53 | snapMode: ListView.SnapOneItem | |
3099 | 62 | Column { | 54 | highlightRangeMode: ListView.StrictlyEnforceRange |
3100 | 63 | id: column | 55 | boundsBehavior: Flickable.StopAtBounds |
3101 | 64 | 56 | ||
3102 | 65 | width: flickable.width | 57 | delegate: Loader { |
3103 | 66 | height: childrenRect.height | 58 | width: ListView.view.width |
3104 | 67 | 59 | height: ListView.view.height | |
3105 | 68 | StandardMenu { | 60 | |
3106 | 69 | text: i18n.tr("Standard Menu\nLook at me, I'm a new line.") | 61 | source: model.source |
2878 | 70 | } | ||
2879 | 71 | |||
2880 | 72 | StandardMenu { | ||
2881 | 73 | iconSource: "image://theme/calendar" | ||
2882 | 74 | iconColor: "red" | ||
2883 | 75 | text: i18n.tr("Standard Menu") | ||
2884 | 76 | component: Component { | ||
2885 | 77 | Button { | ||
2886 | 78 | text: "Press Me" | ||
2887 | 79 | } | ||
2888 | 80 | } | ||
2889 | 81 | } | ||
2890 | 82 | |||
2891 | 83 | |||
2892 | 84 | SliderMenu { | ||
2893 | 85 | id: slider | ||
2894 | 86 | text: i18n.tr("Slider") | ||
2895 | 87 | minimumValue: 0 | ||
2896 | 88 | maximumValue: 100 | ||
2897 | 89 | value: 20 | ||
2898 | 90 | |||
2899 | 91 | minIcon: "image://theme/audio-volume-low" | ||
2900 | 92 | maxIcon: "image://theme/audio-volume-high" | ||
2901 | 93 | } | ||
2902 | 94 | |||
2903 | 95 | ProgressBarMenu { | ||
2904 | 96 | text: i18n.tr("ProgressBar") | ||
2905 | 97 | value: slider.value | ||
2906 | 98 | minimumValue: 0 | ||
2907 | 99 | maximumValue: 100 | ||
2908 | 100 | } | ||
2909 | 101 | |||
2910 | 102 | ProgressValueMenu { | ||
2911 | 103 | text: i18n.tr("ProgressValue") | ||
2912 | 104 | value: slider.value | ||
2913 | 105 | } | ||
2914 | 106 | |||
2915 | 107 | ButtonMenu { | ||
2916 | 108 | text: i18n.tr("Button") | ||
2917 | 109 | buttonText: i18n.tr("Hello world!") | ||
2918 | 110 | } | ||
2919 | 111 | |||
2920 | 112 | CheckableMenu { | ||
2921 | 113 | text: i18n.tr("Checkable") | ||
2922 | 114 | checked: true | ||
2923 | 115 | } | ||
2924 | 116 | |||
2925 | 117 | SwitchMenu { | ||
2926 | 118 | text: i18n.tr("Switch") | ||
2927 | 119 | checked: true | ||
2928 | 120 | } | ||
2929 | 121 | |||
2930 | 122 | SectionMenu { | ||
2931 | 123 | text: i18n.tr("Section Starts Here") | ||
2932 | 124 | busy: true | ||
2933 | 125 | } | ||
2934 | 126 | |||
2935 | 127 | SeparatorMenu {} | ||
2936 | 128 | |||
2937 | 129 | CalendarMenu { | ||
2938 | 130 | id: calendar | ||
2939 | 131 | } | ||
2940 | 132 | |||
2941 | 133 | UserSessionMenu { | ||
2942 | 134 | name: i18n.tr("Lola Chang") | ||
2943 | 135 | iconSource: Qt.resolvedUrl("tests/artwork/avatar.png") | ||
2944 | 136 | active: true | ||
2945 | 137 | } | ||
2946 | 138 | |||
2947 | 139 | MediaPlayerMenu { | ||
2948 | 140 | id: mediaPlayer | ||
2949 | 141 | property int index: 0 | ||
2950 | 142 | |||
2951 | 143 | playerName: "Rhythmbox" | ||
2952 | 144 | playerIcon: Qt.resolvedUrl("tests/artwork/rhythmbox.png") | ||
2953 | 145 | song: mediaPlayerModel.get(index).song; | ||
2954 | 146 | artist: mediaPlayerModel.get(index).artist; | ||
2955 | 147 | album: mediaPlayerModel.get(index).album; | ||
2956 | 148 | albumArt: mediaPlayerModel.get(index).albumArt; | ||
2957 | 149 | } | ||
2958 | 150 | |||
2959 | 151 | PlaybackItemMenu { | ||
2960 | 152 | canPlay: true | ||
2961 | 153 | canGoNext: true | ||
2962 | 154 | canGoPrevious: true | ||
2963 | 155 | playing: mediaPlayer.running | ||
2964 | 156 | |||
2965 | 157 | onPrevious: mediaPlayer.index = Math.max(mediaPlayer.index - 1, 0) | ||
2966 | 158 | onNext: mediaPlayer.index = Math.min(mediaPlayer.index + 1, mediaPlayerModel.count - 1) | ||
2967 | 159 | onPlay: { mediaPlayer.running = !mediaPlayer.running; } | ||
2968 | 160 | } | ||
2969 | 161 | |||
2970 | 162 | TransferMenu { | ||
2971 | 163 | text: "Video Downloading" | ||
2972 | 164 | stateText: "3 minutes remaning" | ||
2973 | 165 | iconSource: "tests/artwork/speak-now.jpg" | ||
2974 | 166 | progress: 0.6 | ||
2975 | 167 | active: true | ||
2976 | 168 | removable: true | ||
2977 | 169 | confirmRemoval: true | ||
2978 | 170 | } | ||
2979 | 171 | |||
2980 | 172 | TransferMenu { | ||
2981 | 173 | text: "Video Downloading" | ||
2982 | 174 | iconSource: "tests/artwork/speak-now.jpg" | ||
2983 | 175 | progress: 0.6 | ||
2984 | 176 | active: false | ||
2985 | 177 | removable: true | ||
2986 | 178 | confirmRemoval: true | ||
2987 | 179 | } | ||
2988 | 180 | |||
2989 | 181 | AccessPointMenu { | ||
2990 | 182 | checked: true | ||
2991 | 183 | secure: true | ||
2992 | 184 | adHoc: false | ||
2993 | 185 | signalStrength: 50 | ||
2994 | 186 | text: "Access Point" | ||
2995 | 187 | } | ||
2996 | 188 | |||
2997 | 189 | GroupedMessageMenu { | ||
2998 | 190 | text: "Group Message" | ||
2999 | 191 | count: "4" | ||
3000 | 192 | } | ||
3001 | 193 | |||
3002 | 194 | SnapDecisionMenu { | ||
3003 | 195 | title: "Snap Decision" | ||
3004 | 196 | time: "10:30am" | ||
3005 | 197 | message: "My mother says I'm handsome!" | ||
3006 | 198 | |||
3007 | 199 | replyMessages: ["Yeah right", "Sure she did"] | ||
3008 | 200 | |||
3009 | 201 | onTriggered: { | ||
3010 | 202 | selected = !selected; | ||
3011 | 203 | } | ||
3012 | 204 | } | ||
3013 | 205 | |||
3014 | 206 | SimpleTextMessageMenu { | ||
3015 | 207 | title: "Simple Text Message" | ||
3016 | 208 | time: "11am" | ||
3017 | 209 | message: "I am a little teacup" | ||
3018 | 210 | |||
3019 | 211 | onTriggered: { | ||
3020 | 212 | selected = !selected; | ||
3021 | 213 | } | ||
3022 | 214 | } | ||
3023 | 215 | |||
3024 | 216 | TextMessageMenu { | ||
3025 | 217 | title: "Text Message" | ||
3026 | 218 | time: "11am" | ||
3027 | 219 | message: "I happen to be tall and thin!" | ||
3028 | 220 | |||
3029 | 221 | onTriggered: { | ||
3030 | 222 | selected = !selected; | ||
3031 | 223 | } | ||
3032 | 224 | } | ||
3033 | 225 | |||
3034 | 226 | Column { | ||
3035 | 227 | anchors { | ||
3036 | 228 | left: parent.left | ||
3037 | 229 | right: parent.right | ||
3038 | 230 | } | ||
3039 | 231 | |||
3040 | 232 | Repeater { | ||
3041 | 233 | model: timeZoneModel | ||
3042 | 234 | |||
3043 | 235 | TimeZoneMenu { | ||
3044 | 236 | city: model.city | ||
3045 | 237 | time: model.time | ||
3046 | 238 | } | ||
3047 | 239 | } | ||
3048 | 240 | } | ||
3049 | 241 | |||
3050 | 242 | Column { | ||
3051 | 243 | anchors { | ||
3052 | 244 | left: parent.left | ||
3053 | 245 | right: parent.right | ||
3054 | 246 | } | ||
3055 | 247 | |||
3056 | 248 | Repeater { | ||
3057 | 249 | model: eventModel | ||
3058 | 250 | |||
3059 | 251 | EventMenu { | ||
3060 | 252 | iconSource: model.icon | ||
3061 | 253 | text: model.text | ||
3062 | 254 | eventColor: model.eventColor | ||
3063 | 255 | time: model.time | ||
3064 | 256 | } | ||
3065 | 257 | } | ||
3066 | 258 | } | ||
3067 | 259 | |||
3068 | 260 | Row { | ||
3069 | 261 | anchors { | ||
3070 | 262 | left: parent.left | ||
3071 | 263 | right: parent.right | ||
3072 | 264 | } | ||
3073 | 265 | |||
3074 | 266 | spacing: units.gu(1) | ||
3075 | 267 | |||
3076 | 268 | Label { | ||
3077 | 269 | text: "StatusIcon" | ||
3078 | 270 | anchors.verticalCenter: parent.verticalCenter | ||
3079 | 271 | } | ||
3080 | 272 | |||
3081 | 273 | StatusIcon { | ||
3082 | 274 | height: units.gu(5) | ||
3083 | 275 | source: "image://theme/gps" | ||
3084 | 276 | } | ||
3085 | 277 | |||
3086 | 278 | StatusIcon { | ||
3087 | 279 | height: units.gu(5) | ||
3088 | 280 | source: "image://theme/battery-caution" | ||
3089 | 281 | } | ||
3090 | 282 | |||
3091 | 283 | StatusIcon { | ||
3092 | 284 | height: units.gu(5) | ||
3093 | 285 | source: "image://theme/missing,gpm-battery-000-charging" | ||
3094 | 286 | } | ||
3095 | 287 | } | ||
3107 | 288 | } | 62 | } |
3108 | 289 | } | 63 | } |
3109 | 64 | |||
3110 | 290 | } | 65 | } |
3111 | 291 | } | 66 | } |
3112 | 292 | 67 | ||
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 | 1 | /* | ||
3118 | 2 | * Copyright 2014 Canonical Ltd. | ||
3119 | 3 | * | ||
3120 | 4 | * This program is free software; you can redistribute it and/or modify | ||
3121 | 5 | * it under the terms of the GNU Lesser General Public License as published by | ||
3122 | 6 | * the Free Software Foundation; version 3. | ||
3123 | 7 | * | ||
3124 | 8 | * This program is distributed in the hope that it will be useful, | ||
3125 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3126 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3127 | 11 | * GNU Lesser General Public License for more details. | ||
3128 | 12 | * | ||
3129 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
3130 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3131 | 15 | * | ||
3132 | 16 | * Authored by Andrea Cimitan <andrea.cimitan@canonical.com> | ||
3133 | 17 | */ | ||
3134 | 18 | |||
3135 | 19 | import QtQuick 2.0 | ||
3136 | 20 | import Ubuntu.Components 1.1 | ||
3137 | 21 | import Ubuntu.Settings.Components 0.1 | ||
3138 | 22 | import Ubuntu.Settings.Menus 0.1 | ||
3139 | 23 | |||
3140 | 24 | Item { | ||
3141 | 25 | property string title: "Transfer Components" | ||
3142 | 26 | |||
3143 | 27 | width: units.gu(42) | ||
3144 | 28 | height: units.gu(75) | ||
3145 | 29 | |||
3146 | 30 | ListModel { | ||
3147 | 31 | id: model | ||
3148 | 32 | ListElement { | ||
3149 | 33 | text: "File name here" | ||
3150 | 34 | state: "Starting…" | ||
3151 | 35 | progress: 0 | ||
3152 | 36 | image: "image://theme/video-x-generic-symbolic" | ||
3153 | 37 | active: true | ||
3154 | 38 | } | ||
3155 | 39 | ListElement { | ||
3156 | 40 | text: "proposition.pdf" | ||
3157 | 41 | state: "10 seconds remaining" | ||
3158 | 42 | progress: 0.7 | ||
3159 | 43 | image: "../tests/artwork/the-man-machine.jpg" | ||
3160 | 44 | active: true | ||
3161 | 45 | } | ||
3162 | 46 | ListElement { | ||
3163 | 47 | text: "electric.jpg" | ||
3164 | 48 | state: "Failed, tap to retry" | ||
3165 | 49 | progress: 1.0 | ||
3166 | 50 | image: "../tests/artwork/electric.jpg" | ||
3167 | 51 | active: true | ||
3168 | 52 | } | ||
3169 | 53 | ListElement { | ||
3170 | 54 | text: "clubbing-friday.jpg.jpg" | ||
3171 | 55 | state: "no state" | ||
3172 | 56 | progress: 0.4 | ||
3173 | 57 | image: "../tests/artwork/speak-now.jpg" | ||
3174 | 58 | active: false | ||
3175 | 59 | } | ||
3176 | 60 | } | ||
3177 | 61 | |||
3178 | 62 | ListView { | ||
3179 | 63 | model: model | ||
3180 | 64 | anchors.fill: parent | ||
3181 | 65 | |||
3182 | 66 | cacheBuffer: 10000 | ||
3183 | 67 | |||
3184 | 68 | delegate: Loader { | ||
3185 | 69 | anchors { | ||
3186 | 70 | left: parent.left | ||
3187 | 71 | right: parent.right | ||
3188 | 72 | } | ||
3189 | 73 | asynchronous: true | ||
3190 | 74 | |||
3191 | 75 | sourceComponent: TransferMenu { | ||
3192 | 76 | text: model.text | ||
3193 | 77 | stateText: model.state | ||
3194 | 78 | progress: model.progress | ||
3195 | 79 | iconSource: model.image | ||
3196 | 80 | active: model.active | ||
3197 | 81 | } | ||
3198 | 82 | } | ||
3199 | 83 | } | ||
3200 | 84 | } | ||
3201 | 0 | 85 | ||
3202 | === added directory 'examples/artwork' | |||
3203 | === added file 'examples/artwork/beach.jpg' | |||
3204 | 1 | Binary 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 | 86 | Binary 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' | |||
3206 | 2 | Binary 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 | 87 | Binary 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' | |||
3208 | 3 | Binary 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 | 88 | Binary 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' | |||
3210 | 4 | Binary 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 | 89 | Binary 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 | 26 | # floating point operations and xml writing is natively supported. | 26 | # floating point operations and xml writing is natively supported. |
3216 | 27 | 27 | ||
3217 | 28 | 28 | ||
3219 | 29 | if test -e SettingsComponents.qml; then | 29 | if test -e runtests.sh; then |
3220 | 30 | echo In-source build detected. | 30 | echo In-source build detected. |
3221 | 31 | SRCDIR=`pwd` | 31 | SRCDIR=`pwd` |
3223 | 32 | elif test -e ../SettingsComponents.qml; then | 32 | elif test -e ../runtests.sh; then |
3224 | 33 | echo Out-of-source build detected. Found source dir at .. | 33 | echo Out-of-source build detected. Found source dir at .. |
3225 | 34 | SRCDIR=`pwd`/.. | 34 | SRCDIR=`pwd`/.. |
3226 | 35 | else | 35 | else |
3227 | 36 | 36 | ||
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 | 3 | 3 | ||
3233 | 4 | set(qmltest_DEFAULT_TARGETS qmluitests) | 4 | set(qmltest_DEFAULT_TARGETS qmluitests) |
3234 | 5 | set(qmltest_DEFAULT_NO_ADD_TEST TRUE) | 5 | set(qmltest_DEFAULT_NO_ADD_TEST TRUE) |
3236 | 6 | set(qmltest_DEFAULT_PROPERTIES "") | 6 | set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C") |
3237 | 7 | 7 | ||
3238 | 8 | set(qmltest_DEFAULT_IMPORT_PATHS | 8 | set(qmltest_DEFAULT_IMPORT_PATHS |
3239 | 9 | ${CMAKE_BINARY_DIR} | 9 | ${CMAKE_BINARY_DIR} |
3240 | @@ -24,7 +24,7 @@ | |||
3241 | 24 | add_qml_test(Menus ProgressBarMenu) | 24 | add_qml_test(Menus ProgressBarMenu) |
3242 | 25 | add_qml_test(Menus ProgressValueMenu) | 25 | add_qml_test(Menus ProgressValueMenu) |
3243 | 26 | add_qml_test(Menus SectionMenu) | 26 | add_qml_test(Menus SectionMenu) |
3245 | 27 | add_qml_test(Menus SimpleTextMessageMenu) | 27 | add_qml_test(Menus SimpleMessageMenu) |
3246 | 28 | add_qml_test(Menus SliderMenu) | 28 | add_qml_test(Menus SliderMenu) |
3247 | 29 | add_qml_test(Menus SnapDecisionMenu) | 29 | add_qml_test(Menus SnapDecisionMenu) |
3248 | 30 | add_qml_test(Menus SwitchMenu) | 30 | add_qml_test(Menus SwitchMenu) |
3249 | @@ -32,3 +32,4 @@ | |||
3250 | 32 | add_qml_test(Menus TextMessageMenu) | 32 | add_qml_test(Menus TextMessageMenu) |
3251 | 33 | add_qml_test(Menus TimeZoneMenu) | 33 | add_qml_test(Menus TimeZoneMenu) |
3252 | 34 | add_qml_test(Menus TransferMenu) | 34 | add_qml_test(Menus TransferMenu) |
3253 | 35 | |||
3254 | 35 | 36 | ||
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 | 46 | id: accessPoint2 | 46 | id: accessPoint2 |
3260 | 47 | anchors.top: accessPoint.bottom | 47 | anchors.top: accessPoint.bottom |
3261 | 48 | 48 | ||
3263 | 49 | checked: true | 49 | active: true |
3264 | 50 | secure: true | 50 | secure: true |
3265 | 51 | adHoc: true | 51 | adHoc: true |
3266 | 52 | signalStrength: 50 | 52 | signalStrength: 50 |
3267 | @@ -66,7 +66,7 @@ | |||
3268 | 66 | when: windowShown | 66 | when: windowShown |
3269 | 67 | 67 | ||
3270 | 68 | function init() { | 68 | function init() { |
3272 | 69 | accessPoint.checked = false; | 69 | accessPoint.active = false; |
3273 | 70 | accessPoint.secure = false; | 70 | accessPoint.secure = false; |
3274 | 71 | accessPoint.adHoc = false; | 71 | accessPoint.adHoc = false; |
3275 | 72 | accessPoint.signalStrength = 0; | 72 | accessPoint.signalStrength = 0; |
3276 | @@ -74,7 +74,7 @@ | |||
3277 | 74 | } | 74 | } |
3278 | 75 | 75 | ||
3279 | 76 | function test_activate() { | 76 | function test_activate() { |
3281 | 77 | mouseClick(accessPoint, accessPoint.width / 2, accessPoint.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 77 | mouseClick(accessPoint, accessPoint.width / 2, accessPoint.height / 2); |
3282 | 78 | compare(signalSpyTriggered.count > 0, true, "activate signal should have been triggered"); | 78 | compare(signalSpyTriggered.count > 0, true, "activate signal should have been triggered"); |
3283 | 79 | } | 79 | } |
3284 | 80 | 80 | ||
3285 | @@ -123,23 +123,5 @@ | |||
3286 | 123 | accessPoint.secure = false; | 123 | accessPoint.secure = false; |
3287 | 124 | compare(icon.visible, false, "Secure icon should not be visible when access point is not secure"); | 124 | compare(icon.visible, false, "Secure icon should not be visible when access point is not secure"); |
3288 | 125 | } | 125 | } |
3289 | 126 | |||
3290 | 127 | function test_checkBox(data) { | ||
3291 | 128 | var checkBox = findChild(accessPoint, "checkBox"); | ||
3292 | 129 | verify(checkBox !== undefined); | ||
3293 | 130 | |||
3294 | 131 | accessPoint.checked = true; | ||
3295 | 132 | compare(checkBox.checked, true, "Checkbox should be checked when access point is checked"); | ||
3296 | 133 | |||
3297 | 134 | accessPoint.checked = false; | ||
3298 | 135 | compare(checkBox.checked, false, "Checkbox should not be checked when access point is not checked"); | ||
3299 | 136 | } | ||
3300 | 137 | |||
3301 | 138 | function test_checkBox_on_default_checked() { | ||
3302 | 139 | var checkBox = findChild(accessPoint2, "checkBox"); | ||
3303 | 140 | verify(checkBox !== undefined); | ||
3304 | 141 | |||
3305 | 142 | compare(checkBox.checked, true, "Check box should be checked if default to checked") | ||
3306 | 143 | } | ||
3307 | 144 | } | 126 | } |
3308 | 145 | } | 127 | } |
3309 | 146 | 128 | ||
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 | 69 | var button2 = findChild(buttonMenu2, "button"); | 69 | var button2 = findChild(buttonMenu2, "button"); |
3315 | 70 | verify(button !== undefined); | 70 | verify(button !== undefined); |
3316 | 71 | 71 | ||
3318 | 72 | mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 72 | mouseClick(button, button.width / 2, button.height / 2); |
3319 | 73 | compare(signalSpy.count > 0, true, "signal clicked not triggered"); | 73 | compare(signalSpy.count > 0, true, "signal clicked not triggered"); |
3320 | 74 | } | 74 | } |
3321 | 75 | } | 75 | } |
3322 | 76 | 76 | ||
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 | 73 | var checkbox = findChild(checkMenu, "checkbox"); | 73 | var checkbox = findChild(checkMenu, "checkbox"); |
3328 | 74 | verify(checkbox !== undefined); | 74 | verify(checkbox !== undefined); |
3329 | 75 | 75 | ||
3331 | 76 | mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 76 | mouseClick(checkMenu, checkbox.width / 2, checkbox.height / 2); |
3332 | 77 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkbox click"); | 77 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkbox click"); |
3333 | 78 | } | 78 | } |
3334 | 79 | 79 | ||
3335 | 80 | function test_clickCheckMenu() { | 80 | function test_clickCheckMenu() { |
3337 | 81 | mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 81 | mouseClick(checkMenu, checkMenu.width / 2, checkMenu.height / 2); |
3338 | 82 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkMenu click"); | 82 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on checkMenu click"); |
3339 | 83 | } | 83 | } |
3340 | 84 | } | 84 | } |
3341 | 85 | 85 | ||
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 | 73 | } | 73 | } |
3347 | 74 | 74 | ||
3348 | 75 | function test_triggered() { | 75 | function test_triggered() { |
3350 | 76 | mouseClick(eventMenu, eventMenu.width / 2, eventMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 76 | mouseClick(eventMenu, eventMenu.width / 2, eventMenu.height / 2); |
3351 | 77 | compare(signalSpyTriggered.count > 0, true, "should have been triggered"); | 77 | compare(signalSpyTriggered.count > 0, true, "should have been triggered"); |
3352 | 78 | } | 78 | } |
3353 | 79 | } | 79 | } |
3354 | 80 | 80 | ||
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 | 79 | } | 79 | } |
3360 | 80 | 80 | ||
3361 | 81 | function test_triggered() { | 81 | function test_triggered() { |
3363 | 82 | mouseClick(messageMenu, messageMenu.width / 2, messageMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 82 | mouseClick(messageMenu, messageMenu.width / 2, messageMenu.height / 2); |
3364 | 83 | compare(signalSpyTriggered.count > 0, true, "should have been triggered"); | 83 | compare(signalSpyTriggered.count > 0, true, "should have been triggered"); |
3365 | 84 | } | 84 | } |
3366 | 85 | 85 | ||
3367 | 86 | 86 | ||
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 | 52 | var player = findChild(mediaPlayerMenu, "player"); | 52 | var player = findChild(mediaPlayerMenu, "player"); |
3373 | 53 | var albumArt = findChild(mediaPlayerMenu, "albumArt"); | 53 | var albumArt = findChild(mediaPlayerMenu, "albumArt"); |
3374 | 54 | 54 | ||
3385 | 55 | var running = mediaPlayerMenu.running | 55 | var showTrack = mediaPlayerMenu.showTrack |
3386 | 56 | 56 | ||
3387 | 57 | compare(player.visible, !running, "player should be not visible when running"); | 57 | compare(player.visible, !showTrack, "player should be not visible when running"); |
3388 | 58 | compare(albumArt.visible, running, "albumn art should be visible when running"); | 58 | compare(albumArt.visible, showTrack, "albumn art should be visible when running"); |
3389 | 59 | 59 | ||
3390 | 60 | running = !running; | 60 | showTrack = !showTrack; |
3391 | 61 | mediaPlayerMenu.running = running; | 61 | mediaPlayerMenu.showTrack = showTrack; |
3392 | 62 | 62 | ||
3393 | 63 | compare(player.visible, !running, "player should be not visible when running"); | 63 | compare(player.visible, !showTrack, "player should be not visible when running"); |
3394 | 64 | compare(albumArt.visible, running, "albumn art should be visible when running"); | 64 | compare(albumArt.visible, showTrack, "albumn art should be visible when running"); |
3395 | 65 | } | 65 | } |
3396 | 66 | } | 66 | } |
3397 | 67 | } | 67 | } |
3398 | 68 | 68 | ||
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 | 94 | playbackItem[data.enableProp] = data.enableValue; | 94 | playbackItem[data.enableProp] = data.enableValue; |
3404 | 95 | 95 | ||
3405 | 96 | var button = findChild(playbackItem, data.objectName); | 96 | var button = findChild(playbackItem, data.objectName); |
3407 | 97 | mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 97 | mouseClick(button, button.width / 2, button.height / 2); |
3408 | 98 | 98 | ||
3409 | 99 | compare(data.signalSpy.count > 0, data.enableValue, data.enableValue ? "signal should be triggered" : "signal should not be triggered"); | 99 | compare(data.signalSpy.count > 0, data.enableValue, data.enableValue ? "signal should be triggered" : "signal should not be triggered"); |
3410 | 100 | } | 100 | } |
3411 | 101 | 101 | ||
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 | 38 | width: flickable.width | 38 | width: flickable.width |
3417 | 39 | height: childrenRect.height | 39 | height: childrenRect.height |
3418 | 40 | 40 | ||
3420 | 41 | SimpleTextMessageMenu { | 41 | SimpleMessageMenu { |
3421 | 42 | id: messageMenu | 42 | id: messageMenu |
3422 | 43 | removable: false | 43 | removable: false |
3423 | 44 | 44 | ||
3424 | 45 | title: "Text Message" | 45 | title: "Text Message" |
3425 | 46 | body: "I am a little teapot" | ||
3426 | 46 | time: "11:08am" | 47 | time: "11:08am" |
3427 | 47 | message: "I am a little teapot" | ||
3428 | 48 | } | 48 | } |
3429 | 49 | 49 | ||
3431 | 50 | SimpleTextMessageMenu { | 50 | SimpleMessageMenu { |
3432 | 51 | id: messageMenuRemovable | 51 | id: messageMenuRemovable |
3433 | 52 | removable: true | 52 | removable: true |
3434 | 53 | anchors.top: messageMenu.bottom | 53 | anchors.top: messageMenu.bottom |
3435 | 54 | } | 54 | } |
3436 | 55 | 55 | ||
3438 | 56 | TextMessageMenu { | 56 | SimpleMessageMenu { |
3439 | 57 | id: messageMenuSelected | 57 | id: messageMenuSelected |
3440 | 58 | removable: true | 58 | removable: true |
3441 | 59 | anchors.top: messageMenuRemovable.bottom | 59 | anchors.top: messageMenuRemovable.bottom |
3442 | @@ -62,8 +62,8 @@ | |||
3443 | 62 | } | 62 | } |
3444 | 63 | 63 | ||
3445 | 64 | SignalSpy { | 64 | SignalSpy { |
3448 | 65 | id: signalSpyActivateApp | 65 | id: signalSpyIconActivated |
3449 | 66 | signalName: "appActivated" | 66 | signalName: "iconActivated" |
3450 | 67 | target: messageMenuSelected | 67 | target: messageMenuSelected |
3451 | 68 | } | 68 | } |
3452 | 69 | 69 | ||
3453 | @@ -78,7 +78,7 @@ | |||
3454 | 78 | when: windowShown | 78 | when: windowShown |
3455 | 79 | 79 | ||
3456 | 80 | function init() { | 80 | function init() { |
3458 | 81 | signalSpyActivateApp.clear(); | 81 | signalSpyIconActivated.clear(); |
3459 | 82 | signalSpyDismiss.clear(); | 82 | signalSpyDismiss.clear(); |
3460 | 83 | messageMenuSelected.selected = false; | 83 | messageMenuSelected.selected = false; |
3461 | 84 | } | 84 | } |
3462 | @@ -108,54 +108,61 @@ | |||
3463 | 108 | function test_time(data) { | 108 | function test_time(data) { |
3464 | 109 | messageMenu.time = data.time; | 109 | messageMenu.time = data.time; |
3465 | 110 | 110 | ||
3495 | 111 | var subtitle = findChild(messageMenu, "subtitle"); | 111 | var time = findChild(messageMenu, "time"); |
3496 | 112 | verify(subtitle !== undefined, "No subtitle"); | 112 | verify(time !== undefined, "No time"); |
3497 | 113 | compare(subtitle.text, data.time, "Time does not match set time."); | 113 | compare(time.text, data.time, "Time does not match set time."); |
3498 | 114 | } | 114 | } |
3499 | 115 | 115 | ||
3500 | 116 | function test_appIcon_data() { | 116 | function test_avatar_data() { |
3501 | 117 | return [ | 117 | return [ |
3502 | 118 | { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") }, | 118 | { avatar: Qt.resolvedUrl("../../artwork/avatar.png") }, |
3503 | 119 | { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, | 119 | { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, |
3504 | 120 | ]; | 120 | ]; |
3505 | 121 | } | 121 | } |
3506 | 122 | 122 | ||
3507 | 123 | function test_appIcon(data) { | 123 | function test_avatar(data) { |
3508 | 124 | messageMenu.appIcon = data.appIcon; | 124 | messageMenu.avatar = data.avatar; |
3509 | 125 | 125 | ||
3510 | 126 | var appIcon = findChild(messageMenu, "appIcon"); | 126 | var avatar = findChild(messageMenu, "avatar"); |
3511 | 127 | verify(appIcon !== undefined, "No app icon"); | 127 | verify(avatar !== undefined, "No avatar"); |
3512 | 128 | compare(appIcon.source, data.appIcon, "App Icon does not match set icon."); | 128 | compare(avatar.source, data.avatar, "Avatar does not match set avatar."); |
3513 | 129 | } | 129 | } |
3514 | 130 | 130 | ||
3515 | 131 | function test_message_data() { | 131 | function test_icon_data() { |
3516 | 132 | return [ | 132 | return [ |
3517 | 133 | { message: "This is a test." }, | 133 | { icon: Qt.resolvedUrl("../../artwork/avatar.png") }, |
3518 | 134 | { message: "Test is also a test." }, | 134 | { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, |
3519 | 135 | ]; | 135 | ]; |
3520 | 136 | } | 136 | } |
3521 | 137 | 137 | ||
3522 | 138 | function test_message(data) { | 138 | function test_icon(data) { |
3523 | 139 | messageMenu.message = data.message; | 139 | messageMenu.icon = data.icon; |
3524 | 140 | |||
3525 | 141 | var icon = findChild(messageMenu, "icon"); | ||
3526 | 142 | verify(icon !== undefined, "No icon"); | ||
3527 | 143 | compare(icon.source, data.icon, "Icon does not match set icon."); | ||
3528 | 144 | } | ||
3529 | 145 | |||
3530 | 146 | function test_body_data() { | ||
3531 | 147 | return [ | ||
3532 | 148 | { body: "This is a test." }, | ||
3533 | 149 | { body: "Test is also a test." }, | ||
3534 | 150 | ]; | ||
3535 | 151 | } | ||
3536 | 152 | |||
3537 | 153 | function test_body(data) { | ||
3538 | 154 | messageMenu.body = data.body; | ||
3539 | 140 | 155 | ||
3540 | 141 | var body = findChild(messageMenu, "body"); | 156 | var body = findChild(messageMenu, "body"); |
3541 | 142 | verify(body !== undefined, "No body"); | 157 | verify(body !== undefined, "No body"); |
3543 | 143 | compare(body.text, data.message, "Message does not match set message."); | 158 | compare(body.text, data.body, "Message does not match set message."); |
3544 | 144 | } | 159 | } |
3545 | 145 | 160 | ||
3559 | 146 | function test_activateApp() { | 161 | function test_iconActivated() { |
3560 | 147 | var appIcon = findChild(messageMenuSelected, "appIcon"); | 162 | var icon = findChild(messageMenuSelected, "icon"); |
3561 | 148 | 163 | ||
3562 | 149 | mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 164 | mouseClick(icon, icon.width / 2, icon.height / 2); |
3563 | 150 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered"); | 165 | compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered"); |
3551 | 151 | |||
3552 | 152 | messageMenuSelected.selected = false; | ||
3553 | 153 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3554 | 154 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected"); | ||
3555 | 155 | |||
3556 | 156 | messageMenuSelected.selected = true; | ||
3557 | 157 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3558 | 158 | compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected"); | ||
3564 | 159 | } | 166 | } |
3565 | 160 | 167 | ||
3566 | 161 | function test_dismiss() { | 168 | function test_dismiss() { |
3567 | 162 | 169 | ||
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 | 43 | removable: false | 43 | removable: false |
3573 | 44 | 44 | ||
3574 | 45 | title: "Text Message" | 45 | title: "Text Message" |
3575 | 46 | body: "I am a little teapot" | ||
3576 | 46 | time: "11:08am" | 47 | time: "11:08am" |
3578 | 47 | message: "I am a little teapot" | 48 | _animationDuration: 0 |
3579 | 48 | } | 49 | } |
3580 | 49 | 50 | ||
3581 | 50 | SnapDecisionMenu { | 51 | SnapDecisionMenu { |
3582 | 51 | id: messageMenuRemovable | 52 | id: messageMenuRemovable |
3583 | 52 | removable: true | 53 | removable: true |
3584 | 53 | anchors.top: messageMenu.bottom | 54 | anchors.top: messageMenu.bottom |
3585 | 55 | _animationDuration: 0 | ||
3586 | 54 | } | 56 | } |
3587 | 55 | 57 | ||
3588 | 56 | SnapDecisionMenu { | 58 | SnapDecisionMenu { |
3589 | @@ -58,6 +60,7 @@ | |||
3590 | 58 | removable: true | 60 | removable: true |
3591 | 59 | selected: true | 61 | selected: true |
3592 | 60 | anchors.top: messageMenuRemovable.bottom | 62 | anchors.top: messageMenuRemovable.bottom |
3593 | 63 | _animationDuration: 0 | ||
3594 | 61 | 64 | ||
3595 | 62 | onReplied: { | 65 | onReplied: { |
3596 | 63 | textMessageReply = value; | 66 | textMessageReply = value; |
3597 | @@ -69,8 +72,8 @@ | |||
3598 | 69 | property string textMessageReply: "" | 72 | property string textMessageReply: "" |
3599 | 70 | 73 | ||
3600 | 71 | SignalSpy { | 74 | SignalSpy { |
3603 | 72 | id: signalSpyActivateApp | 75 | id: signalSpyIconActivated |
3604 | 73 | signalName: "appActivated" | 76 | signalName: "iconActivated" |
3605 | 74 | target: messageMenuSelected | 77 | target: messageMenuSelected |
3606 | 75 | } | 78 | } |
3607 | 76 | 79 | ||
3608 | @@ -81,8 +84,8 @@ | |||
3609 | 81 | } | 84 | } |
3610 | 82 | 85 | ||
3611 | 83 | SignalSpy { | 86 | SignalSpy { |
3614 | 84 | id: signalSpyActivate | 87 | id: signalSpyActionActivated |
3615 | 85 | signalName: "activated" | 88 | signalName: "actionActivated" |
3616 | 86 | target: messageMenuSelected | 89 | target: messageMenuSelected |
3617 | 87 | } | 90 | } |
3618 | 88 | 91 | ||
3619 | @@ -97,9 +100,9 @@ | |||
3620 | 97 | when: windowShown | 100 | when: windowShown |
3621 | 98 | 101 | ||
3622 | 99 | function init() { | 102 | function init() { |
3624 | 100 | signalSpyActivateApp.clear(); | 103 | signalSpyIconActivated.clear(); |
3625 | 101 | signalSpyDismiss.clear(); | 104 | signalSpyDismiss.clear(); |
3627 | 102 | signalSpyActivate.clear(); | 105 | signalSpyActionActivated.clear(); |
3628 | 103 | signalSpyReply.clear(); | 106 | signalSpyReply.clear(); |
3629 | 104 | textMessageReply = ""; | 107 | textMessageReply = ""; |
3630 | 105 | 108 | ||
3631 | @@ -132,39 +135,71 @@ | |||
3632 | 132 | function test_time(data) { | 135 | function test_time(data) { |
3633 | 133 | messageMenu.time = data.time; | 136 | messageMenu.time = data.time; |
3634 | 134 | 137 | ||
3635 | 138 | var subtitle = findChild(messageMenu, "time"); | ||
3636 | 139 | verify(subtitle !== undefined, "No time"); | ||
3637 | 140 | compare(subtitle.text, data.time, "Time does not match set time."); | ||
3638 | 141 | } | ||
3639 | 142 | |||
3640 | 143 | function test_avatar_data() { | ||
3641 | 144 | return [ | ||
3642 | 145 | { avatar: Qt.resolvedUrl("../../artwork/avatar.png") }, | ||
3643 | 146 | { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, | ||
3644 | 147 | ]; | ||
3645 | 148 | } | ||
3646 | 149 | |||
3647 | 150 | function test_avatar(data) { | ||
3648 | 151 | messageMenu.avatar = data.avatar; | ||
3649 | 152 | |||
3650 | 153 | var avatar = findChild(messageMenu, "avatar"); | ||
3651 | 154 | verify(avatar !== undefined, "No avatar"); | ||
3652 | 155 | compare(avatar.source, data.avatar, "Avatar does not match set avatar."); | ||
3653 | 156 | } | ||
3654 | 157 | |||
3655 | 158 | function test_icon_data() { | ||
3656 | 159 | return [ | ||
3657 | 160 | { icon: Qt.resolvedUrl("../../artwork/avatar.png") }, | ||
3658 | 161 | { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, | ||
3659 | 162 | ]; | ||
3660 | 163 | } | ||
3661 | 164 | |||
3662 | 165 | function test_icon(data) { | ||
3663 | 166 | messageMenu.icon = data.icon; | ||
3664 | 167 | |||
3665 | 168 | var icon = findChild(messageMenu, "icon"); | ||
3666 | 169 | verify(icon !== undefined, "No icon"); | ||
3667 | 170 | compare(icon.source, data.icon, "Icon does not match set icon."); | ||
3668 | 171 | } | ||
3669 | 172 | |||
3670 | 173 | function test_body_data() { | ||
3671 | 174 | return [ | ||
3672 | 175 | { body: "This is a test." }, | ||
3673 | 176 | { body: "Test is also a test." }, | ||
3674 | 177 | ]; | ||
3675 | 178 | } | ||
3676 | 179 | |||
3677 | 180 | function test_body(data) { | ||
3678 | 181 | messageMenu.body = data.body; | ||
3679 | 182 | |||
3680 | 135 | var body = findChild(messageMenu, "body"); | 183 | var body = findChild(messageMenu, "body"); |
3681 | 136 | verify(body !== undefined, "No body"); | 184 | verify(body !== undefined, "No body"); |
3713 | 137 | compare(body.text, data.time, "Time does not match set time."); | 185 | compare(body.text, data.body, "Message does not match set message."); |
3714 | 138 | } | 186 | } |
3715 | 139 | 187 | ||
3716 | 140 | function test_appIcon_data() { | 188 | function test_iconActivated() { |
3717 | 141 | return [ | 189 | var icon = findChild(messageMenuSelected, "icon"); |
3718 | 142 | { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") }, | 190 | |
3719 | 143 | { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, | 191 | mouseClick(icon, icon.width / 2, icon.height / 2); |
3720 | 144 | ]; | 192 | compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered"); |
3721 | 145 | } | 193 | } |
3722 | 146 | 194 | ||
3723 | 147 | function test_appIcon(data) { | 195 | function test_dismiss() { |
3724 | 148 | messageMenu.appIcon = data.appIcon; | 196 | mouseFlick(messageMenuRemovable, |
3725 | 149 | 197 | messageMenuRemovable.width / 2, | |
3726 | 150 | var appIcon = findChild(messageMenu, "appIcon"); | 198 | messageMenuRemovable.height / 2, |
3727 | 151 | verify(appIcon !== undefined, "No app icon"); | 199 | messageMenuRemovable.width, |
3728 | 152 | compare(appIcon.source, data.appIcon, "App Icon does not match set icon."); | 200 | messageMenuRemovable.height / 2, |
3729 | 153 | } | 201 | true, true, units.gu(1), 10); |
3730 | 154 | 202 | tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true); | |
3700 | 155 | function test_message_data() { | ||
3701 | 156 | return [ | ||
3702 | 157 | { message: "This is a test." }, | ||
3703 | 158 | { message: "Test is also a test." }, | ||
3704 | 159 | ]; | ||
3705 | 160 | } | ||
3706 | 161 | |||
3707 | 162 | function test_message(data) { | ||
3708 | 163 | messageMenu.message = data.message; | ||
3709 | 164 | |||
3710 | 165 | var subtitle = findChild(messageMenu, "subtitle"); | ||
3711 | 166 | verify(subtitle !== undefined, "No subtitle"); | ||
3712 | 167 | compare(subtitle.text, data.message, "Message does not match set message."); | ||
3731 | 168 | } | 203 | } |
3732 | 169 | 204 | ||
3733 | 170 | function test_replyButtonText_data() { | 205 | function test_replyButtonText_data() { |
3734 | @@ -182,52 +217,27 @@ | |||
3735 | 182 | compare(button.text, data.buttonText, "Button text does not match set text."); | 217 | compare(button.text, data.buttonText, "Button text does not match set text."); |
3736 | 183 | } | 218 | } |
3737 | 184 | 219 | ||
3738 | 185 | function test_activateApp() { | ||
3739 | 186 | var appIcon = findChild(messageMenuSelected, "appIcon"); | ||
3740 | 187 | |||
3741 | 188 | mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3742 | 189 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered"); | ||
3743 | 190 | |||
3744 | 191 | messageMenuSelected.selected = false; | ||
3745 | 192 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3746 | 193 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected"); | ||
3747 | 194 | |||
3748 | 195 | messageMenuSelected.selected = true; | ||
3749 | 196 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3750 | 197 | compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected"); | ||
3751 | 198 | } | ||
3752 | 199 | |||
3753 | 200 | function test_dismiss() { | ||
3754 | 201 | mouseFlick(messageMenuRemovable, | ||
3755 | 202 | messageMenuRemovable.width / 2, | ||
3756 | 203 | messageMenuRemovable.height / 2, | ||
3757 | 204 | messageMenuRemovable.width, | ||
3758 | 205 | messageMenuRemovable.height / 2, | ||
3759 | 206 | true, true, units.gu(1), 10); | ||
3760 | 207 | tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true); | ||
3761 | 208 | } | ||
3762 | 209 | |||
3763 | 210 | function test_activateEnabled() { | 220 | function test_activateEnabled() { |
3764 | 211 | messageMenuSelected.selected = true; | 221 | messageMenuSelected.selected = true; |
3766 | 212 | messageMenuSelected.activateEnabled = false; | 222 | messageMenuSelected.actionEnabled = false; |
3767 | 213 | 223 | ||
3768 | 214 | var actionButton = findChild(messageMenuSelected, "actionButton"); | 224 | var actionButton = findChild(messageMenuSelected, "actionButton"); |
3769 | 215 | verify(actionButton !== undefined, "Action button not found"); | 225 | verify(actionButton !== undefined, "Action button not found"); |
3770 | 216 | 226 | ||
3771 | 217 | compare(actionButton.enabled, false, "Action button should not be enabled when activateEnabled=false"); | 227 | compare(actionButton.enabled, false, "Action button should not be enabled when activateEnabled=false"); |
3773 | 218 | messageMenuSelected.activateEnabled = true | 228 | messageMenuSelected.actionEnabled = true |
3774 | 219 | compare(actionButton.enabled, true, "Action button should be enabled when activateEnabled=true"); | 229 | compare(actionButton.enabled, true, "Action button should be enabled when activateEnabled=true"); |
3775 | 220 | } | 230 | } |
3776 | 221 | 231 | ||
3778 | 222 | function test_activate() { | 232 | function test_actionActivated() { |
3779 | 223 | messageMenuSelected.selected = true; | 233 | messageMenuSelected.selected = true; |
3781 | 224 | messageMenuSelected.activateEnabled = true; | 234 | messageMenuSelected.actionEnabled = true; |
3782 | 225 | 235 | ||
3783 | 226 | var actionButton = findChild(messageMenuSelected, "actionButton"); | 236 | var actionButton = findChild(messageMenuSelected, "actionButton"); |
3784 | 227 | verify(actionButton !== undefined, "Action button not found"); | 237 | verify(actionButton !== undefined, "Action button not found"); |
3785 | 228 | 238 | ||
3788 | 229 | mouseClick(actionButton, actionButton.width / 2, actionButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 239 | mouseClick(actionButton, actionButton.width / 2, actionButton.height / 2); |
3789 | 230 | compare(signalSpyActivate.count > 0, true); | 240 | compare(signalSpyActionActivated.count > 0, true); |
3790 | 231 | } | 241 | } |
3791 | 232 | 242 | ||
3792 | 233 | function test_replyEnabled_data() { | 243 | function test_replyEnabled_data() { |
3793 | @@ -249,7 +259,7 @@ | |||
3794 | 249 | 259 | ||
3795 | 250 | var messageButton = findChild(messageMenuSelected, "messageButton"); | 260 | var messageButton = findChild(messageMenuSelected, "messageButton"); |
3796 | 251 | verify(messageButton !== undefined, "Message button not found"); | 261 | verify(messageButton !== undefined, "Message button not found"); |
3798 | 252 | mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300); | 262 | mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2); |
3799 | 253 | 263 | ||
3800 | 254 | var sendButton = findChild(messageMenuSelected, "sendButton"); | 264 | var sendButton = findChild(messageMenuSelected, "sendButton"); |
3801 | 255 | verify(sendButton !== undefined, "Send button not found"); | 265 | verify(sendButton !== undefined, "Send button not found"); |
3802 | @@ -267,12 +277,12 @@ | |||
3803 | 267 | 277 | ||
3804 | 268 | var messageButton = findChild(messageMenuSelected, "messageButton"); | 278 | var messageButton = findChild(messageMenuSelected, "messageButton"); |
3805 | 269 | verify(messageButton !== undefined, "Message button not found"); | 279 | verify(messageButton !== undefined, "Message button not found"); |
3807 | 270 | mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300); | 280 | mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2); |
3808 | 271 | 281 | ||
3809 | 272 | var sendButton = findChild(messageMenuSelected, "sendButton"); | 282 | var sendButton = findChild(messageMenuSelected, "sendButton"); |
3810 | 273 | verify(sendButton !== undefined, "Send button not found"); | 283 | verify(sendButton !== undefined, "Send button not found"); |
3811 | 274 | 284 | ||
3813 | 275 | mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 285 | mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2); |
3814 | 276 | compare(signalSpyReply.count > 0, true); | 286 | compare(signalSpyReply.count > 0, true); |
3815 | 277 | compare(textMessageReply, "reply1", "Text message did not reply with correct text."); | 287 | compare(textMessageReply, "reply1", "Text message did not reply with correct text."); |
3816 | 278 | } | 288 | } |
3817 | @@ -284,28 +294,5 @@ | |||
3818 | 284 | { tag: 'reply3', index: 2, expected: "reply3" } | 294 | { tag: 'reply3', index: 2, expected: "reply3" } |
3819 | 285 | ] | 295 | ] |
3820 | 286 | } | 296 | } |
3821 | 287 | |||
3822 | 288 | function test_reply_with_message(data) { | ||
3823 | 289 | messageMenuSelected.selected = true; | ||
3824 | 290 | messageMenu.replyEnabled = true; | ||
3825 | 291 | messageMenuSelected.replyMessages = [ "reply1", "reply2", "reply3", "reply4" ]; | ||
3826 | 292 | |||
3827 | 293 | var messageButton = findChild(messageMenuSelected, "messageButton"); | ||
3828 | 294 | verify(messageButton !== undefined, "Message button not found"); | ||
3829 | 295 | mouseClick(messageButton, messageButton.width / 2, messageButton.height / 2, Qt.LeftButton, Qt.NoModifier, 300); | ||
3830 | 296 | |||
3831 | 297 | tryCompareFunction(function() { return messageMenuSelected.implicitHeight == messageMenuSelected.expandedHeight; }, true); | ||
3832 | 298 | |||
3833 | 299 | var replyMessage = findChild(messageMenuSelected, "replyMessage"+data.index); | ||
3834 | 300 | verify(replyMessage !== undefined, "Reply message not found"); | ||
3835 | 301 | mouseClick(replyMessage, replyMessage.width / 2, replyMessage.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3836 | 302 | |||
3837 | 303 | var sendButton = findChild(messageMenuSelected, "sendButton"); | ||
3838 | 304 | verify(sendButton !== undefined, "Send button not found"); | ||
3839 | 305 | |||
3840 | 306 | mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
3841 | 307 | compare(signalSpyReply.count > 0, true); | ||
3842 | 308 | compare(textMessageReply, data.expected, "Text message did not reply with correct text."); | ||
3843 | 309 | } | ||
3844 | 310 | } | 297 | } |
3845 | 311 | } | 298 | } |
3846 | 312 | 299 | ||
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 | 77 | 77 | ||
3852 | 78 | function test_clickSwitchBox() { | 78 | function test_clickSwitchBox() { |
3853 | 79 | var switcher = findChild(switchMenu, "switcher"); | 79 | var switcher = findChild(switchMenu, "switcher"); |
3855 | 80 | mouseClick(switchMenu, switcher.width / 2, switcher.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 80 | mouseClick(switchMenu, switcher.width / 2, switcher.height / 2); |
3856 | 81 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switcher click"); | 81 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switcher click"); |
3857 | 82 | } | 82 | } |
3858 | 83 | 83 | ||
3859 | 84 | function test_clickSwitchMenu() { | 84 | function test_clickSwitchMenu() { |
3861 | 85 | mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 85 | mouseClick(switchMenu, switchMenu.width / 2, switchMenu.height / 2); |
3862 | 86 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switchMenu click"); | 86 | compare(signalSpyTriggered.count > 0, true, "signal checked not triggered on switchMenu click"); |
3863 | 87 | } | 87 | } |
3864 | 88 | } | 88 | } |
3865 | 89 | 89 | ||
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 | 43 | removable: false | 43 | removable: false |
3871 | 44 | 44 | ||
3872 | 45 | title: "Text Message" | 45 | title: "Text Message" |
3873 | 46 | body: "I am a little teapot" | ||
3874 | 46 | time: "11:08am" | 47 | time: "11:08am" |
3876 | 47 | message: "I am a little teapot" | 48 | _animationDuration: 0 |
3877 | 48 | } | 49 | } |
3878 | 49 | 50 | ||
3879 | 50 | TextMessageMenu { | 51 | TextMessageMenu { |
3880 | 51 | id: messageMenuRemovable | 52 | id: messageMenuRemovable |
3881 | 52 | removable: true | 53 | removable: true |
3882 | 53 | anchors.top: messageMenu.bottom | 54 | anchors.top: messageMenu.bottom |
3883 | 55 | _animationDuration: 0 | ||
3884 | 54 | } | 56 | } |
3885 | 55 | 57 | ||
3886 | 56 | TextMessageMenu { | 58 | TextMessageMenu { |
3887 | 57 | id: messageMenuSelected | 59 | id: messageMenuSelected |
3888 | 58 | removable: true | 60 | removable: true |
3889 | 59 | anchors.top: messageMenuRemovable.bottom | 61 | anchors.top: messageMenuRemovable.bottom |
3890 | 62 | _animationDuration: 0 | ||
3891 | 60 | 63 | ||
3892 | 61 | onReplied: { | 64 | onReplied: { |
3893 | 62 | textMessageReply = value; | 65 | textMessageReply = value; |
3894 | @@ -68,8 +71,8 @@ | |||
3895 | 68 | property string textMessageReply: "" | 71 | property string textMessageReply: "" |
3896 | 69 | 72 | ||
3897 | 70 | SignalSpy { | 73 | SignalSpy { |
3900 | 71 | id: signalSpyActivateApp | 74 | id: signalSpyIconActivated |
3901 | 72 | signalName: "appActivated" | 75 | signalName: "iconActivated" |
3902 | 73 | target: messageMenuSelected | 76 | target: messageMenuSelected |
3903 | 74 | } | 77 | } |
3904 | 75 | 78 | ||
3905 | @@ -90,7 +93,7 @@ | |||
3906 | 90 | when: windowShown | 93 | when: windowShown |
3907 | 91 | 94 | ||
3908 | 92 | function init() { | 95 | function init() { |
3910 | 93 | signalSpyActivateApp.clear(); | 96 | signalSpyIconActivated.clear(); |
3911 | 94 | signalSpyDismiss.clear(); | 97 | signalSpyDismiss.clear(); |
3912 | 95 | signalSpyReply.clear(); | 98 | signalSpyReply.clear(); |
3913 | 96 | textMessageReply = ""; | 99 | textMessageReply = ""; |
3914 | @@ -124,39 +127,71 @@ | |||
3915 | 124 | function test_time(data) { | 127 | function test_time(data) { |
3916 | 125 | messageMenu.time = data.time; | 128 | messageMenu.time = data.time; |
3917 | 126 | 129 | ||
3920 | 127 | var subtitle = findChild(messageMenu, "subtitle"); | 130 | var subtitle = findChild(messageMenu, "time"); |
3921 | 128 | verify(subtitle !== undefined, "No subtitle"); | 131 | verify(subtitle !== undefined, "No time"); |
3922 | 129 | compare(subtitle.text, data.time, "Time does not match set time."); | 132 | compare(subtitle.text, data.time, "Time does not match set time."); |
3923 | 130 | } | 133 | } |
3924 | 131 | 134 | ||
3949 | 132 | function test_appIcon_data() { | 135 | function test_avatar_data() { |
3950 | 133 | return [ | 136 | return [ |
3951 | 134 | { appIcon: Qt.resolvedUrl("../../artwork/avatar.png") }, | 137 | { avatar: Qt.resolvedUrl("../../artwork/avatar.png") }, |
3952 | 135 | { appIcon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, | 138 | { avatar: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, |
3953 | 136 | ]; | 139 | ]; |
3954 | 137 | } | 140 | } |
3955 | 138 | 141 | ||
3956 | 139 | function test_appIcon(data) { | 142 | function test_avatar(data) { |
3957 | 140 | messageMenu.appIcon = data.appIcon; | 143 | messageMenu.avatar = data.avatar; |
3958 | 141 | 144 | ||
3959 | 142 | var appIcon = findChild(messageMenu, "appIcon"); | 145 | var avatar = findChild(messageMenu, "avatar"); |
3960 | 143 | verify(appIcon !== undefined, "No app icon"); | 146 | verify(avatar !== undefined, "No avatar"); |
3961 | 144 | compare(appIcon.source, data.appIcon, "App Icon does not match set icon."); | 147 | compare(avatar.source, data.avatar, "Avatar does not match set avatar."); |
3962 | 145 | } | 148 | } |
3963 | 146 | 149 | ||
3964 | 147 | function test_message_data() { | 150 | function test_icon_data() { |
3965 | 148 | return [ | 151 | return [ |
3966 | 149 | { message: "This is a test." }, | 152 | { icon: Qt.resolvedUrl("../../artwork/avatar.png") }, |
3967 | 150 | { message: "Test is also a test." }, | 153 | { icon: Qt.resolvedUrl("../../artwork/rhythmbox.png") }, |
3968 | 151 | ]; | 154 | ]; |
3969 | 152 | } | 155 | } |
3970 | 153 | 156 | ||
3971 | 154 | function test_message(data) { | 157 | function test_icon(data) { |
3972 | 155 | messageMenu.message = data.message; | 158 | messageMenu.icon = data.icon; |
3973 | 159 | |||
3974 | 160 | var icon = findChild(messageMenu, "icon"); | ||
3975 | 161 | verify(icon !== undefined, "No icon"); | ||
3976 | 162 | compare(icon.source, data.icon, "Icon does not match set icon."); | ||
3977 | 163 | } | ||
3978 | 164 | |||
3979 | 165 | function test_body_data() { | ||
3980 | 166 | return [ | ||
3981 | 167 | { body: "This is a test." }, | ||
3982 | 168 | { body: "Test is also a test." }, | ||
3983 | 169 | ]; | ||
3984 | 170 | } | ||
3985 | 171 | |||
3986 | 172 | function test_body(data) { | ||
3987 | 173 | messageMenu.body = data.body; | ||
3988 | 156 | 174 | ||
3989 | 157 | var body = findChild(messageMenu, "body"); | 175 | var body = findChild(messageMenu, "body"); |
3990 | 158 | verify(body !== undefined, "No body"); | 176 | verify(body !== undefined, "No body"); |
3992 | 159 | compare(body.text, data.message, "Message does not match set message."); | 177 | compare(body.text, data.body, "Message does not match set message."); |
3993 | 178 | } | ||
3994 | 179 | |||
3995 | 180 | function test_iconActivated() { | ||
3996 | 181 | var icon = findChild(messageMenuSelected, "icon"); | ||
3997 | 182 | |||
3998 | 183 | mouseClick(icon, icon.width / 2, icon.height / 2); | ||
3999 | 184 | compare(signalSpyIconActivated.count > 0, true, "activate icon should have been triggered"); | ||
4000 | 185 | } | ||
4001 | 186 | |||
4002 | 187 | function test_dismiss() { | ||
4003 | 188 | mouseFlick(messageMenuRemovable, | ||
4004 | 189 | messageMenuRemovable.width / 2, | ||
4005 | 190 | messageMenuRemovable.height / 2, | ||
4006 | 191 | messageMenuRemovable.width, | ||
4007 | 192 | messageMenuRemovable.height / 2, | ||
4008 | 193 | true, true, units.gu(1), 10); | ||
4009 | 194 | tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true); | ||
4010 | 160 | } | 195 | } |
4011 | 161 | 196 | ||
4012 | 162 | function test_replyButtonText_data() { | 197 | function test_replyButtonText_data() { |
4013 | @@ -174,31 +209,6 @@ | |||
4014 | 174 | compare(button.text, data.buttonText, "Button text does not match set text."); | 209 | compare(button.text, data.buttonText, "Button text does not match set text."); |
4015 | 175 | } | 210 | } |
4016 | 176 | 211 | ||
4017 | 177 | function test_activateApp() { | ||
4018 | 178 | var appIcon = findChild(messageMenuSelected, "appIcon"); | ||
4019 | 179 | |||
4020 | 180 | mouseClick(appIcon, appIcon.width * 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
4021 | 181 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered"); | ||
4022 | 182 | |||
4023 | 183 | messageMenuSelected.selected = false; | ||
4024 | 184 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
4025 | 185 | compare(signalSpyActivateApp.count, 0, "activate app should not have been triggered when not selected"); | ||
4026 | 186 | |||
4027 | 187 | messageMenuSelected.selected = true; | ||
4028 | 188 | mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | ||
4029 | 189 | compare(signalSpyActivateApp.count > 0, true, "activate app should have been triggered when selected"); | ||
4030 | 190 | } | ||
4031 | 191 | |||
4032 | 192 | function test_dismiss() { | ||
4033 | 193 | mouseFlick(messageMenuRemovable, | ||
4034 | 194 | messageMenuRemovable.width / 2, | ||
4035 | 195 | messageMenuRemovable.height / 2, | ||
4036 | 196 | messageMenuRemovable.width, | ||
4037 | 197 | messageMenuRemovable.height / 2, | ||
4038 | 198 | true, true, units.gu(1), 10); | ||
4039 | 199 | tryCompareFunction(function() { return signalSpyDismiss.count > 0; }, true); | ||
4040 | 200 | } | ||
4041 | 201 | |||
4042 | 202 | function test_replyEnabled_data() { | 212 | function test_replyEnabled_data() { |
4043 | 203 | return [ | 213 | return [ |
4044 | 204 | { tag: 'disabledNoReply', enabled: false, reply: "", expected: false}, | 214 | { tag: 'disabledNoReply', enabled: false, reply: "", expected: false}, |
4045 | @@ -234,7 +244,7 @@ | |||
4046 | 234 | var sendButton = findChild(messageMenuSelected, "sendButton"); | 244 | var sendButton = findChild(messageMenuSelected, "sendButton"); |
4047 | 235 | verify(sendButton !== undefined, "Send button not found"); | 245 | verify(sendButton !== undefined, "Send button not found"); |
4048 | 236 | 246 | ||
4050 | 237 | mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2, Qt.LeftButton, Qt.NoModifier, 0); | 247 | mouseClick(sendButton, sendButton.width / 2, sendButton.height / 2); |
4051 | 238 | compare(signalSpyReply.count > 0, true); | 248 | compare(signalSpyReply.count > 0, true); |
4052 | 239 | compare(textMessageReply, "reply1", "Text message did not reply with correct text."); | 249 | compare(textMessageReply, "reply1", "Text message did not reply with correct text."); |
4053 | 240 | } | 250 | } |
4054 | 241 | 251 | ||
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 | 15 | */ | 15 | */ |
4060 | 16 | 16 | ||
4061 | 17 | import QtTest 1.0 | 17 | import QtTest 1.0 |
4063 | 18 | import Ubuntu.Components 0.1 | 18 | import Ubuntu.Components 1.1 |
4064 | 19 | import Ubuntu.Test 0.1 as UT | 19 | import Ubuntu.Test 0.1 as UT |
4065 | 20 | 20 | ||
4066 | 21 | TestCase { | 21 | TestCase { |
FAILED: Continuous integration, rev:79 jenkins. qa.ubuntu. com/job/ ubuntu- settings- components- ci/65/ jenkins. qa.ubuntu. com/job/ ubuntu- settings- components- qmltests- utopic/ 23/console jenkins. qa.ubuntu. com/job/ ubuntu- settings- components- utopic- amd64-ci/ 27 jenkins. qa.ubuntu. com/job/ ubuntu- settings- components- utopic- armhf-ci/ 27
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- settings- components- ci/65/rebuild
http://