@@ -21,16 +21,17 @@ Item {
2121 id: root
2222 property var department: null
2323 property var currentDepartment: null
24− property var scopeStyle: Object({ foreground: "grey", background: "transparent" })
24+ property var scopeStyle: null
2525 signal enterDepartment(var newDepartmentId, bool hasChildren)
2626 signal goBackToParentClicked()
2727 signal allDepartmentClicked()
2828
2929 readonly property int itemHeight: units.gu(5)
30+ readonly property color foregroundColor: root.scopeStyle ? root.scopeStyle.foreground : "grey"
3031 implicitHeight: flickable.contentHeight
3132
3233 Rectangle {
33− color: Qt.colorEqual(root.scopeStyle.background, "transparent") ? "white" : root.scopeStyle.background
34+ color: !root.scopeStyle || Qt.colorEqual(root.scopeStyle.background, "transparent") ? "white" : root.scopeStyle.background
3435 anchors.fill: parent
3536 }
3637
@@ -82,7 +83,7 @@ Item {
8283 name: "back"
8384 height: units.gu(2)
8485 width: height
85− color: root.scopeStyle.foreground
86+ color: root.foregroundColor
8687 }
8788
8889 Label {
@@ -92,7 +93,7 @@ Item {
9293 leftMargin: units.gu(0.5)
9394 }
9495 text: department ? department.parentLabel : ""
95− color: root.scopeStyle.foreground
96+ color: root.foregroundColor
9697 }
9798
9899 Rectangle {
@@ -103,7 +104,7 @@ Item {
103104 leftMargin: units.gu(2)
104105 rightMargin: units.gu(2)
105106 }
106− color: root.scopeStyle.foreground
107+ color: root.foregroundColor
107108 opacity: 0.2
108109 height: units.dp(1)
109110 }
@@ -124,7 +125,7 @@ Item {
124125 }
125126 text: department ? (department.allLabel != "" ? department.allLabel : department.label) : ""
126127 font.bold: true
127− color: root.scopeStyle.foreground
128+ color: root.foregroundColor
128129 }
129130
130131 Rectangle {
@@ -135,7 +136,7 @@ Item {
135136 leftMargin: units.gu(2)
136137 rightMargin: units.gu(2)
137138 }
138− color: root.scopeStyle.foreground
139+ color: root.foregroundColor
139140 opacity: 0.2
140141 height: units.dp(1)
141142 }
@@ -160,7 +161,7 @@ Item {
160161 leftMargin: units.gu(2)
161162 }
162163 text: label
163− color: root.scopeStyle.foreground
164+ color: root.foregroundColor
164165 }
165166
166167 Icon {
@@ -172,7 +173,7 @@ Item {
172173 height: units.gu(2)
173174 width: height
174175 name: hasChildren ? "go-next" : "tick"
175− color: root.scopeStyle.foreground
176+ color: root.foregroundColor
176177 visible: hasChildren || isActive
177178 }
178179
@@ -184,7 +185,7 @@ Item {
184185 leftMargin: units.gu(2)
185186 rightMargin: units.gu(2)
186187 }
187− color: root.scopeStyle.foreground
188+ color: root.foregroundColor
188189 opacity: 0.1
189190 height: units.dp(1)
190191 visible: index != department.count - 1