on xenial help sign in
Merge
b1ddcfbAlbert Astals
debian/changelog+32
@@ -1,3 +1,35 @@
1+unity8 (7.84+14.04.20140207.1-0ubuntu1) trusty; urgency=low
2+
3+ [ Ted Gould ]
4+ * You can't tap anywhere
5+
6+ [ Michał Sawicz ]
7+ * Wait for the indicator to appear.
8+ * Add CardTool to determine category-wide card properties based on the
9+ category template. Clean up test configurations, too.
10+ * Actions Preview Widget
11+ * Add Preview for new generation scopes.
12+ * Add overlay to card. Fix implicit card height. .
13+
14+ [ Albert Astals ]
15+ * Basic ImageGallery widget for Previews Mostly a copy of the code
16+ used in AppPreview.qml but without the MouseArea hack that I'll wait
17+ to introduce until we start using this somewhere were it is needed
18+ * Actions Preview Widget
19+
20+ [ Andrea Cimitan ]
21+ * First audio player widget for previews, with tests
22+ * Adds TextSummary preview widget
23+
24+ [ Michał Karnicki ]
25+ * Add overlay to card. Fix implicit card height. .
26+
27+ [ Michael Terry ]
28+ * Expand greeter demo support to include listing multiple users and
29+ specifying individual passwords and names.
30+
31+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 07 Feb 2014 10:46:46 +0000
32+
1unity8 (7.84+14.04.20140204-0ubuntu1) trusty; urgency=low
33unity8 (7.84+14.04.20140204-0ubuntu1) trusty; urgency=low
2
34
3 [ Michael Terry ]
35 [ Michael Terry ]
qml/Components/ListItems/Header.qml+3−13
@@ -36,7 +36,7 @@ Item {
36 right: parent.right
36 right: parent.right
37 rightMargin: units.gu(0.5)
37 rightMargin: units.gu(0.5)
38 top: parent.top
38 top: parent.top
39− bottom: bottomBorder.top
39+ bottom: parent.bottom
40 }
40 }
41
41
42 Label {
42 Label {
@@ -47,14 +47,13 @@ Item {
47 verticalCenter: parent.verticalCenter
47 verticalCenter: parent.verticalCenter
48 }
48 }
49
49
50+ // TODO karni: Fix when Ubuntu color pallete is updated.
50− color: Theme.palette.selected.backgroundText //at 60%
51+ color: "grey" // Theme.palette.selected.backgroundText //at 60%
51 opacity: 0.6
52 opacity: 0.6
52 font.family: "Ubuntu"
53 font.family: "Ubuntu"
53 fontSize: "medium"
54 fontSize: "medium"
54 elide: Text.ElideRight
55 elide: Text.ElideRight
55 textFormat: Text.PlainText
56 textFormat: Text.PlainText
56− style: Text.Raised
57− styleColor: "black"
58 width: parent.width - image.width - image.leftMargin - anchors.leftMargin
57 width: parent.width - image.width - image.leftMargin - anchors.leftMargin
59 }
58 }
60
59
@@ -68,15 +67,6 @@ Item {
68 }
67 }
69 }
68 }
70
69
71− ThinDivider {
72− id: bottomBorder
73− anchors {
74− left: parent.left
75− right: parent.right
76− bottom: parent.bottom
77− }
78− }
79−
80 MouseArea {
70 MouseArea {
81 anchors.fill: parent
71 anchors.fill: parent
82 onClicked: parent.clicked(mouse)
72 onClicked: parent.clicked(mouse)
qml/Dash/Card.qml+2
@@ -143,5 +143,7 @@ AbstractButton {
143 text: cardData && cardData["summary"] || ""
143 text: cardData && cardData["summary"] || ""
144 height: text ? implicitHeight : 0
144 height: text ? implicitHeight : 0
145 fontSize: "small"
145 fontSize: "small"
146+ // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
147+ color: "grey"
146 }
148 }
147}
149}
qml/Dash/CardFilterGrid.qml+1−1
@@ -23,7 +23,7 @@ DashFilterGrid {
23 minimumHorizontalSpacing: units.gu(0.5)
23 minimumHorizontalSpacing: units.gu(0.5)
24 delegateWidth: cardTool.cardWidth
24 delegateWidth: cardTool.cardWidth
25 delegateHeight: cardTool.cardHeight
25 delegateHeight: cardTool.cardHeight
26− verticalSpacing: units.gu(2)
26+ verticalSpacing: units.gu(1)
27
27
28 CardTool {
28 CardTool {
29 id: cardTool
29 id: cardTool
qml/Dash/CardHeader.qml+4−5
@@ -81,9 +81,9 @@ Item {
81 font.weight: Font.DemiBold
81 font.weight: Font.DemiBold
82 wrapMode: Text.Wrap
82 wrapMode: Text.Wrap
83 maximumLineCount: 2
83 maximumLineCount: 2
84− fontSize: "small"
85 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
84 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
85+ // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
86− color: template["overlay"] === true ? "white" : Theme.palette.selected.backgroundText
86+ color: template["overlay"] === true ? "white" : "grey" // Theme.palette.normal.backgroundText
87 }
87 }
88
88
89 Label {
89 Label {
@@ -93,9 +93,8 @@ Item {
93 elide: Text.ElideRight
93 elide: Text.ElideRight
94 font.weight: Font.Light
94 font.weight: Font.Light
95 visible: titleLabel.text && text
95 visible: titleLabel.text && text
96− fontSize: "x-small"
97 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
98− color: template["overlay"] === true ? "white" : Theme.palette.selected.backgroundText
97+ color: template["overlay"] === true ? "white" : "grey" // Theme.palette.normal.backgroundText
99 }
98 }
100
99
101 Row {
100 Row {
@@ -116,7 +115,7 @@ Item {
116 width: parent.labelWidth
115 width: parent.labelWidth
117 elide: Text.ElideRight
116 elide: Text.ElideRight
118 font.weight: Font.DemiBold
117 font.weight: Font.DemiBold
119− color: Theme.palette.selected.foreground
118+ color: "grey" // Theme.palette.normal.backgroundText
120 visible: text
119 visible: text
121 }
120 }
122
121
qml/Dash/DashContent.qml+8
@@ -80,6 +80,14 @@ Item {
80 }
80 }
81 }
81 }
82
82
83+ Image {
84+ anchors.fill: parent
85+ source: shell.width > shell.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
86+ fillMode: Image.PreserveAspectCrop
87+ horizontalAlignment: Image.AlignRight
88+ verticalAlignment: Image.AlignTop
89+ }
90+
83 Item {
91 Item {
84 id: dashContentListHolder
92 id: dashContentListHolder
85 anchors.fill: parent
93 anchors.fill: parent
qml/Dash/DashFilterGrid.qml+1−1
@@ -26,6 +26,7 @@ DashRenderer {
26 property alias delegate: filterGrid.delegate
26 property alias delegate: filterGrid.delegate
27 property alias delegateWidth: filterGrid.delegateWidth
27 property alias delegateWidth: filterGrid.delegateWidth
28 property alias delegateHeight: filterGrid.delegateHeight
28 property alias delegateHeight: filterGrid.delegateHeight
29+ property alias verticalSpacing: filterGrid.verticalSpacing
29 property alias maximumNumberOfColumns: filterGrid.maximumNumberOfColumns
30 property alias maximumNumberOfColumns: filterGrid.maximumNumberOfColumns
30 property alias minimumHorizontalSpacing: filterGrid.minimumHorizontalSpacing
31 property alias minimumHorizontalSpacing: filterGrid.minimumHorizontalSpacing
31
32
@@ -40,7 +41,6 @@ DashRenderer {
40 height: filterGrid.height
41 height: filterGrid.height
41 margins: filterGrid.margins
42 margins: filterGrid.margins
42 uncollapsedHeight: filterGrid.uncollapsedHeight
43 uncollapsedHeight: filterGrid.uncollapsedHeight
43− verticalSpacing: filterGrid.verticalSpacing
44
44
45 function startFilterAnimation(filter) {
45 function startFilterAnimation(filter) {
46 filterGrid.startFilterAnimation(filter)
46 filterGrid.startFilterAnimation(filter)
qml/Dash/GenericScopeView.qml+2
@@ -193,6 +193,7 @@ FocusScope {
193 previewListView.categoryId = categoryId
193 previewListView.categoryId = categoryId
194 previewListView.categoryDelegate = rendererLoader.item
194 previewListView.categoryDelegate = rendererLoader.item
195 previewListView.model = target.model;
195 previewListView.model = target.model;
196+ previewListView.currentIndex = -1
196 previewListView.currentIndex = index;
197 previewListView.currentIndex = index;
197
198
198 var item = target.model.get(index);
199 var item = target.model.get(index);
@@ -209,6 +210,7 @@ FocusScope {
209 previewListView.categoryId = categoryId
210 previewListView.categoryId = categoryId
210 previewListView.categoryDelegate = rendererLoader.item
211 previewListView.categoryDelegate = rendererLoader.item
211 previewListView.model = target.model;
212 previewListView.model = target.model;
213+ previewListView.currentIndex = -1
212 previewListView.currentIndex = index;
214 previewListView.currentIndex = index;
213 previewListView.open = true
215 previewListView.open = true
214 }
216 }
qml/Dash/PreviewListView.qml−5
@@ -173,11 +173,6 @@ Item {
173 to: 1.0
173 to: 1.0
174 duration: UbuntuAnimation.BriskDuration
174 duration: UbuntuAnimation.BriskDuration
175 }
175 }
176−
177− ActivityIndicator {
178− anchors.centerIn: parent
179− running: visible
180− }
181 }
176 }
182 }
177 }
183}
178}
qml/Dash/Previews/PreviewZoomableImage.qmlnew file+41
@@ -0,0 +1,41 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
19+import "../../Components"
20+
21+/*! \brief Preview widget for image.
22+
23+ This widget shows image contained in widgetData["source"],
24+ can be zoomable accordingly with widgetData["zoomable"].
25+ */
26+
27+PreviewWidget {
28+ id: root
29+ implicitHeight: units.gu(22)
30+
31+ LazyImage {
32+ objectName: "image"
33+ anchors {
34+ top: parent.top
35+ bottom: parent.bottom
36+ }
37+ scaleTo: "height"
38+ source: widgetData["source"]
39+ initialWidth: units.gu(13)
40+ }
41+}
qml/Dash/graphics/paper_landscape@27.pngnew file

Binary file not shown.

qml/Dash/graphics/paper_portrait@27.pngnew file

Binary file not shown.

qml/Shell.qml−30
@@ -125,27 +125,6 @@ FocusScope {
125 shell.background = gSettingsPicture
125 shell.background = gSettingsPicture
126 }
126 }
127
127
128− // This is a dummy image that is needed to determine if the picture url
129− // in backgroundSettings points to a valid picture file.
130− // We can't do this with the real background image because setting a
131− // new source in onStatusChanged triggers a binding loop detection
132− // inside Image, which causes it not to render even though a valid source
133− // would be set. We don't mind about this image staying black and just
134− // use it for verification to populate the source for the real
135− // background image.
136− Image {
137− source: shell.background
138− height: 0
139− width: 0
140− sourceSize.height: 0
141− sourceSize.width: 0
142− onStatusChanged: {
143− if (status == Image.Error && source != shell.defaultBackground) {
144− shell.background = defaultBackground
145− }
146− }
147− }
148−
149 VolumeControl {
128 VolumeControl {
150 id: volumeControl
129 id: volumeControl
151 }
130 }
@@ -174,15 +153,6 @@ FocusScope {
174 // through the translucent parts of the shell surface.
153 // through the translucent parts of the shell surface.
175 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
154 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
176
155
177− CrossFadeImage {
178− id: backgroundImage
179− objectName: "backgroundImage"
180−
181− anchors.fill: parent
182− source: shell.background
183− fillMode: Image.PreserveAspectCrop
184− }
185−
186 Rectangle {
156 Rectangle {
187 anchors.fill: parent
157 anchors.fill: parent
188 color: "black"
158 color: "black"
tests/qmltests/CMakeLists.txt+1
@@ -61,6 +61,7 @@ add_qml_test(Dash/Previews PreviewActions IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_
61add_qml_test(Dash/Previews PreviewAudioPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
61add_qml_test(Dash/Previews PreviewAudioPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
62add_qml_test(Dash/Previews PreviewImageGallery IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
62add_qml_test(Dash/Previews PreviewImageGallery IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
63add_qml_test(Dash/Previews PreviewTextSummary IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
63add_qml_test(Dash/Previews PreviewTextSummary IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
64+add_qml_test(Dash/Previews PreviewZoomableImage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
64add_qml_test(Greeter Lockscreen IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
65add_qml_test(Greeter Lockscreen IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
65 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
66 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
66add_qml_test(Greeter Tablet IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
67add_qml_test(Greeter Tablet IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+2−2
@@ -23,7 +23,7 @@ Rectangle {
23 id: root
23 id: root
24 width: units.gu(60)
24 width: units.gu(60)
25 height: units.gu(80)
25 height: units.gu(80)
26− color: "grey"
26+ color: "lightgrey"
27
27
28 property var sourcesModel0: {
28 property var sourcesModel0: {
29 "sources": []
29 "sources": []
@@ -44,7 +44,7 @@ Rectangle {
44 }
44 }
45
45
46 UT.UnityTestCase {
46 UT.UnityTestCase {
47− name: "ImageGalleryTest"
47+ name: "PreviewImageGalleryTest"
48 when: windowShown
48 when: windowShown
49
49
50 function test_changeEmptyModel() {
50 function test_changeEmptyModel() {
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qmlnew file+57
@@ -0,0 +1,57 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import "../../../../qml/Dash/Previews"
20+import Unity.Test 0.1 as UT
21+
22+Rectangle {
23+ id: root
24+ width: units.gu(40)
25+ height: units.gu(80)
26+ color: "lightgrey"
27+
28+ property var widgetData0: {
29+ "source": ""
30+ }
31+
32+ property var widgetData1: {
33+ "source": "../../graphics/phone_background.jpg",
34+ "zoomable": false
35+ }
36+
37+ PreviewZoomableImage {
38+ id: zoomableImage
39+ width: parent.width
40+ widgetData: widgetData1
41+ }
42+
43+ UT.UnityTestCase {
44+ name: "PreviewZoomableImageTest"
45+ when: windowShown
46+
47+ function test_loadImage() {
48+ var image = findChild(zoomableImage, "image");
49+
50+ zoomableImage.widgetData = widgetData0;
51+ tryCompare(image.state, "default");
52+
53+ zoomableImage.widgetData = widgetData1;
54+ tryCompare(image.state, "ready");
55+ }
56+ }
57+}