on xenial help sign in
Bring gradients back into DashRenderer, where they belong.
commit68f87615cf0bcacff0c5af607db5854826349f8f authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 5 Mar 2014, 15:07 (13 years ago) parent2c2804966491bf
3 files changed+25−63
qml/Dash/Apps/RunningApplicationsGrid.qml−30 qml/Dash/DashRenderer.qml−30 qml/Dash/GenericScopeView.qml+25−3
qml/Dash/Apps/RunningApplicationsGrid.qml−30
@@ -27,12 +27,6 @@ ResponsiveFlowView {
2727 property alias enableHeightBehavior: heightBehaviour.enabled
2828 property bool enableHeightBehaviorOnNextCreation: firstModel.count + secondModel.count == 0
2929
30− /// Whether this is the first item in the list
31− property bool firstItem: false
32−
33− /// Whether this is the last item in the list
34− property bool lastItem: false
35−
3630 Connections {
3731 target: shell
3832 onDashShownChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
@@ -123,28 +117,4 @@ ResponsiveFlowView {
123117 root.terminationModeEnabled = false;
124118 }
125119 }
126−
127− Image {
128− visible: !firstItem
129− anchors {
130− top: parent.top
131− left: parent.left
132− right: parent.right
133− }
134− fillMode: Image.Stretch
135− source: "../graphics/dash_divider_top_lightgrad.png"
136− z: -1
137− }
138−
139− Image {
140− visible: !lastItem
141− anchors {
142− bottom: parent.bottom
143− left: parent.left
144− right: parent.right
145− }
146− fillMode: Image.Stretch
147− source: "../graphics/dash_divider_top_darkgrad.png"
148− z: -1
149− }
150120}
qml/Dash/DashRenderer.qml−30
@@ -68,34 +68,4 @@ Item {
6868
6969 /// Component mapping and configuration from the scope
7070 property var components
71−
72− /// Whether this is the first item in the list
73− property bool firstItem: false
74−
75− /// Whether this is the last item in the list
76− property bool lastItem: false
77−
78− Image {
79− visible: !firstItem
80− anchors {
81− top: parent.top
82− left: parent.left
83− right: parent.right
84− }
85− fillMode: Image.Stretch
86− source: "graphics/dash_divider_top_lightgrad.png"
87− z: -1
88− }
89−
90− Image {
91− visible: !lastItem
92− anchors {
93− bottom: parent.bottom
94− left: parent.left
95− right: parent.right
96− }
97− fillMode: Image.Stretch
98− source: "graphics/dash_divider_top_darkgrad.png"
99− z: -1
100− }
10171}
qml/Dash/GenericScopeView.qml+25−3
@@ -149,9 +149,6 @@ FocusScope {
149149 source: getRenderer(model.renderer, results)
150150
151151 onLoaded: {
152− item.firstItem = Qt.binding(function() { return index === 0 });
153− // FIXME Should not rely on count field of model, SortfilterProxyModel in this case.
154− item.lastItem = Qt.binding(function() { return index === categoryView.model.count - 1 });
155152 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
156153 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
157154 scopeView.enableHeightBehaviorOnNextCreation = false;
@@ -263,6 +260,31 @@ FocusScope {
263260 }
264261 }
265262 }
263+
264+ Image {
265+ visible: index != 0
266+ anchors {
267+ top: parent.top
268+ left: parent.left
269+ right: parent.right
270+ }
271+ fillMode: Image.Stretch
272+ source: "graphics/dash_divider_top_lightgrad.png"
273+ z: -1
274+ }
275+
276+ Image {
277+ // FIXME Should not rely on count field of model, SortfilterProxyModel in this case.
278+ visible: index != categoryView.model.count - 1
279+ anchors {
280+ bottom: parent.bottom
281+ left: parent.left
282+ right: parent.right
283+ }
284+ fillMode: Image.Stretch
285+ source: "graphics/dash_divider_top_darkgrad.png"
286+ z: -1
287+ }
266288 }
267289
268290 onHeightChanged: rendererLoader.updateDelegateCreationRange();