on xenial help sign in
Add DashBackground
0ae6ba3Albert Astals
qml/Dash/Dash.qml+2−5
@@ -154,12 +154,9 @@ Showable {
154 }
154 }
155 }
155 }
156
156
157− Image {
157+ DashBackground
158+ {
158 anchors.fill: scopeItem
159 anchors.fill: scopeItem
159− source: parent.width > parent.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
160− fillMode: Image.PreserveAspectCrop
161− horizontalAlignment: Image.AlignRight
162− verticalAlignment: Image.AlignTop
163 }
160 }
164
161
165 GenericScopeView {
162 GenericScopeView {
qml/Dash/DashBackground.qmlnew file+24
@@ -0,0 +1,24 @@
1+/*
2+ * Copyright (C) 2013, 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+
19+Image {
20+ source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
21+ fillMode: Image.PreserveAspectCrop
22+ horizontalAlignment: Image.AlignRight
23+ verticalAlignment: Image.AlignTop
24+}
qml/Dash/DashContent.qml+1−5
@@ -85,12 +85,8 @@ Item {
85
85
86 anchors.fill: parent
86 anchors.fill: parent
87
87
88− Image {
88+ DashBackground {
89 anchors.fill: parent
89 anchors.fill: parent
90− source: parent.width > parent.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
91− fillMode: Image.PreserveAspectCrop
92− horizontalAlignment: Image.AlignRight
93− verticalAlignment: Image.AlignTop
94 }
90 }
95
91
96 ListView {
92 ListView {
qml/Dash/ScopesOverview.qml+6−11
@@ -29,18 +29,13 @@ Item {
29 signal favoriteSelected(int index)
29 signal favoriteSelected(int index)
30 signal allSelected(var scope)
30 signal allSelected(var scope)
31
31
32− Image {
32+ DashBackground {
33 anchors.fill: parent
33 anchors.fill: parent
34− source: parent.width > parent.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
35− fillMode: Image.PreserveAspectCrop
36− horizontalAlignment: Image.AlignRight
37− verticalAlignment: Image.AlignTop
38− }
39−
40− Rectangle {
34+ Rectangle {
41− color: "black"
35+ color: "black"
42− anchors.fill: parent
36+ anchors.fill: parent
43− opacity: 0.6
37+ opacity: 0.6
38+ }
44 }
39 }
45
40
46 Item {
41 Item {
qml/Dash/ScopesOverviewAll.qml−1
@@ -38,7 +38,6 @@ Flickable {
38 }
38 }
39
39
40 onClicked: {
40 onClicked: {
41− console.log(model);
42 root.clicked(index, result);
41 root.clicked(index, result);
43 }
42 }
44 onPressAndHold: {
43 onPressAndHold: {