on xenial help sign in
Bring gradients back into DashRenderer, where they belong.
68f8761Michał Sawicz
qml/Dash/Apps/RunningApplicationsGrid.qml−30
@@ -27,12 +27,6 @@ ResponsiveFlowView {
27 property alias enableHeightBehavior: heightBehaviour.enabled
27 property alias enableHeightBehavior: heightBehaviour.enabled
28 property bool enableHeightBehaviorOnNextCreation: firstModel.count + secondModel.count == 0
28 property bool enableHeightBehaviorOnNextCreation: firstModel.count + secondModel.count == 0
29
29
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−
36 Connections {
30 Connections {
37 target: shell
31 target: shell
38 onDashShownChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
32 onDashShownChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
@@ -123,28 +117,4 @@ ResponsiveFlowView {
123 root.terminationModeEnabled = false;
117 root.terminationModeEnabled = false;
124 }
118 }
125 }
119 }
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− }
150}
120}
qml/Dash/DashRenderer.qml−30
@@ -68,34 +68,4 @@ Item {
68
68
69 /// Component mapping and configuration from the scope
69 /// Component mapping and configuration from the scope
70 property var components
70 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− }
101}
71}
qml/Dash/GenericScopeView.qml+25−3
@@ -149,9 +149,6 @@ FocusScope {
149 source: getRenderer(model.renderer, results)
149 source: getRenderer(model.renderer, results)
150
150
151 onLoaded: {
151 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 });
155 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
152 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
156 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
153 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
157 scopeView.enableHeightBehaviorOnNextCreation = false;
154 scopeView.enableHeightBehaviorOnNextCreation = false;
@@ -263,6 +260,31 @@ FocusScope {
263 }
260 }
264 }
261 }
265 }
262 }
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+ }
266 }
288 }
267
289
268 onHeightChanged: rendererLoader.updateDelegateCreationRange();
290 onHeightChanged: rendererLoader.updateDelegateCreationRange();