on xenial help sign in
Saviq's gradient improvement
66491bfAlbert Astals
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
@@ -153,9 +153,6 @@ FocusScope {
153 source: getRenderer(model.renderer, results)
153 source: getRenderer(model.renderer, results)
154
154
155 onLoaded: {
155 onLoaded: {
156− item.firstItem = Qt.binding(function() { return index === 0 });
157− // FIXME Should not rely on count field of model, SortfilterProxyModel in this case.
158− item.lastItem = Qt.binding(function() { return index === categoryView.model.count - 1 });
159 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
156 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
160 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
157 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
161 scopeView.enableHeightBehaviorOnNextCreation = false;
158 scopeView.enableHeightBehaviorOnNextCreation = false;
@@ -267,6 +264,31 @@ FocusScope {
267 }
264 }
268 }
265 }
269 }
266 }
267+
268+ Image {
269+ visible: index != 0
270+ anchors {
271+ top: parent.top
272+ left: parent.left
273+ right: parent.right
274+ }
275+ fillMode: Image.Stretch
276+ source: "graphics/dash_divider_top_lightgrad.png"
277+ z: -1
278+ }
279+
280+ Image {
281+ // FIXME Should not rely on count field of model, SortfilterProxyModel in this case.
282+ visible: index != categoryView.model.count - 1
283+ anchors {
284+ bottom: parent.bottom
285+ left: parent.left
286+ right: parent.right
287+ }
288+ fillMode: Image.Stretch
289+ source: "graphics/dash_divider_top_darkgrad.png"
290+ z: -1
291+ }
270 }
292 }
271
293
272 onHeightChanged: rendererLoader.updateDelegateCreationRange();
294 onHeightChanged: rendererLoader.updateDelegateCreationRange();