@@ -21,16 +21,17 @@ Item {
22 property var department: null
22 property var department: null
23 property var currentDepartment: null
23 property var currentDepartment: null
24− property var scopeStyle: Object({ foreground: "grey", background: "transparent" })
24+ property var scopeStyle: null
25 signal enterDepartment(var newDepartmentId, bool hasChildren)
25 signal enterDepartment(var newDepartmentId, bool hasChildren)
26 signal goBackToParentClicked()
26 signal goBackToParentClicked()
27 signal allDepartmentClicked()
27 signal allDepartmentClicked()
29 readonly property int itemHeight: units.gu(5)
29 readonly property int itemHeight: units.gu(5)
30+ readonly property color foregroundColor: root.scopeStyle ? root.scopeStyle.foreground : "grey"
30 implicitHeight: flickable.contentHeight
31 implicitHeight: flickable.contentHeight
32 Rectangle {
33 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
34 anchors.fill: parent
35 anchors.fill: parent
@@ -82,7 +83,7 @@ Item {
82 name: "back"
83 name: "back"
83 height: units.gu(2)
84 height: units.gu(2)
84 width: height
85 width: height
85− color: root.scopeStyle.foreground
86+ color: root.foregroundColor
@@ -92,7 +93,7 @@ Item {
92 leftMargin: units.gu(0.5)
93 leftMargin: units.gu(0.5)
94 text: department ? department.parentLabel : ""
95 text: department ? department.parentLabel : ""
95− color: root.scopeStyle.foreground
96+ color: root.foregroundColor
98 Rectangle {
99 Rectangle {
@@ -103,7 +104,7 @@ Item {
103 leftMargin: units.gu(2)
104 leftMargin: units.gu(2)
104 rightMargin: units.gu(2)
105 rightMargin: units.gu(2)
106− color: root.scopeStyle.foreground
107+ color: root.foregroundColor
107 opacity: 0.2
108 opacity: 0.2
108 height: units.dp(1)
109 height: units.dp(1)
@@ -124,7 +125,7 @@ Item {
125 text: department ? (department.allLabel != "" ? department.allLabel : department.label) : ""
126 text: department ? (department.allLabel != "" ? department.allLabel : department.label) : ""
126 font.bold: true
127 font.bold: true
127− color: root.scopeStyle.foreground
128+ color: root.foregroundColor
130 Rectangle {
131 Rectangle {
@@ -135,7 +136,7 @@ Item {
135 leftMargin: units.gu(2)
136 leftMargin: units.gu(2)
136 rightMargin: units.gu(2)
137 rightMargin: units.gu(2)
138− color: root.scopeStyle.foreground
139+ color: root.foregroundColor
139 opacity: 0.2
140 opacity: 0.2
140 height: units.dp(1)
141 height: units.dp(1)
@@ -160,7 +161,7 @@ Item {
160 leftMargin: units.gu(2)
161 leftMargin: units.gu(2)
162 text: label
163 text: label
163− color: root.scopeStyle.foreground
164+ color: root.foregroundColor
@@ -172,7 +173,7 @@ Item {
172 height: units.gu(2)
173 height: units.gu(2)
173 width: height
174 width: height
174 name: hasChildren ? "go-next" : "tick"
175 name: hasChildren ? "go-next" : "tick"
175− color: root.scopeStyle.foreground
176+ color: root.foregroundColor
176 visible: hasChildren || isActive
177 visible: hasChildren || isActive
@@ -184,7 +185,7 @@ Item {
184 leftMargin: units.gu(2)
185 leftMargin: units.gu(2)
185 rightMargin: units.gu(2)
186 rightMargin: units.gu(2)
187− color: root.scopeStyle.foreground
188+ color: root.foregroundColor
188 opacity: 0.1
189 opacity: 0.1
189 height: units.dp(1)
190 height: units.dp(1)
190 visible: index != department.count - 1
191 visible: index != department.count - 1