on xenial help sign in
Saviq's gradient improvement
commit66491bf591d0fe16f4df74334c01402a7d3516d5 authorAlbert Astals <albert.astals@canonical.com> dateWed 26 Feb 2014, 12:04 (13 years ago) parentb6cff45
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
@@ -153,9 +153,6 @@ FocusScope {
153153 source: getRenderer(model.renderer, results)
154154
155155 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 });
159156 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
160157 item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
161158 scopeView.enableHeightBehaviorOnNextCreation = false;
@@ -267,6 +264,31 @@ FocusScope {
267264 }
268265 }
269266 }
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+ }
270292 }
271293
272294 onHeightChanged: rendererLoader.updateDelegateCreationRange();