@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
19import Utils 0.1
19import Utils 0.1
20import Unity 0.2
20import Unity 0.2
21import Unity.Application 0.1
21import Unity.Application 0.1
22import "../Components"
23import "../Components"
23import "../Components/ListItems" as ListItems
24import "../Components/ListItems" as ListItems
@@ -33,9 +34,10 @@ FocusScope {
33 property bool hasBackAction: false
34 property bool hasBackAction: false
34 property bool enableHeightBehaviorOnNextCreation: false
35 property bool enableHeightBehaviorOnNextCreation: false
35 property var categoryView: categoryView
36 property var categoryView: categoryView
36− // TODO Should be taken from the theme
37+
37− property color foregroundColor: scope && scope.customizations["foreground-color"] || "grey"
38+ property var styleTool: StyleTool {
38− property color backgroundColor: scope && scope.customizations["background-color"] || "transparent"
39+ style: scope ? scope.customizations : {}
40 signal backClicked()
42 signal backClicked()
@@ -103,7 +105,7 @@ FocusScope {
104 Rectangle {
106 Rectangle {
105 anchors.fill: parent
107 anchors.fill: parent
106− color: scopeView.backgroundColor
108+ color: scopeView.styleTool.background
107 visible: color != "transparent"
109 visible: color != "transparent"
@@ -174,7 +176,7 @@ FocusScope {
174 item.model = Qt.binding(function() { return results })
176 item.model = Qt.binding(function() { return results })
176 item.objectName = Qt.binding(function() { return categoryId })
178 item.objectName = Qt.binding(function() { return categoryId })
177− item.foregroundColor = Qt.binding(function() { return scopeView.foregroundColor })
179+ item.styleTool = scopeView.styleTool;
178 if (item.expandable) {
180 if (item.expandable) {
179 var shouldFilter = categoryId != categoryView.expandedCategoryId;
181 var shouldFilter = categoryId != categoryView.expandedCategoryId;
180 item.setFilter(shouldFilter, false /*animate*/);
182 item.setFilter(shouldFilter, false /*animate*/);
@@ -314,7 +316,7 @@ FocusScope {
314 property var delegate: categoryView.item(delegateIndex)
316 property var delegate: categoryView.item(delegateIndex)
315 width: categoryView.width
317 width: categoryView.width
316 text: section
318 text: section
317− textColor: foregroundColor
319+ textColor: styleTool.foreground
319 if (delegate && delegate.expandable)
321 if (delegate && delegate.expandable)
320 return delegate.filtered ? "graphics/header_handlearrow.png" : "graphics/header_handlearrow2.png"
322 return delegate.filtered ? "graphics/header_handlearrow.png" : "graphics/header_handlearrow2.png"
@@ -335,8 +337,7 @@ FocusScope {
335 showBackButton: scopeView.hasBackAction
337 showBackButton: scopeView.hasBackAction
336 searchEntryEnabled: true
338 searchEntryEnabled: true
337 searchInProgress: scopeView.scope ? scopeView.scope.searchInProgress : false
339 searchInProgress: scopeView.scope ? scopeView.scope.searchInProgress : false
338− foregroundColor: scopeView.foregroundColor
340+ styleTool: scopeView.styleTool
339− imageSource: scopeView.scope && scopeView.scope.customizations["page-header"] && scopeView.scope.customizations["page-header"]["logo"] || ""
341 bottomItem: DashDepartments {
342 bottomItem: DashDepartments {
342 scope: scopeView.scope
343 scope: scopeView.scope
@@ -344,8 +345,7 @@ FocusScope {
344 anchors.right: parent.right
345 anchors.right: parent.right
345 windowHeight: scopeView.height
346 windowHeight: scopeView.height
346 windowWidth: scopeView.width
347 windowWidth: scopeView.width
347− foregroundColor: scopeView.foregroundColor
348+ styleTool: scopeView.styleTool
348− backgroundColor: scopeView.backgroundColor === Qt.rgba(0, 0, 0, 0) ? "white" : scopeView.backgroundColor
351 onBackClicked: scopeView.backClicked()
351 onBackClicked: scopeView.backClicked()
@@ -357,6 +357,7 @@ FocusScope {
357 objectName: "previewListView"
357 objectName: "previewListView"
358 visible: x != width
358 visible: x != width
359 scope: scopeView.scope
359 scope: scopeView.scope
360+ styleTool: scopeView.styleTool
360 width: parent.width
361 width: parent.width
361 height: parent.height
362 height: parent.height
362 anchors.left: categoryView.right
363 anchors.left: categoryView.right