on xenial help sign in
Adapt to scope colors
a3695b5Andrea Cimitan
qml/Dash/GenericScopeView.qml+2
@@ -167,6 +167,7 @@ FocusScope {
167 }
167 }
168
168
169 Rectangle {
169 Rectangle {
170+ id: scopeBackground
170 anchors.fill: parent
171 anchors.fill: parent
171 color: scopeView.scopeStyle ? scopeView.scopeStyle.background : "transparent"
172 color: scopeView.scopeStyle ? scopeView.scopeStyle.background : "transparent"
172 visible: color != "transparent"
173 visible: color != "transparent"
@@ -657,6 +658,7 @@ FocusScope {
657 target: categoryView
658 target: categoryView
658
659
659 readonly property real contentY: categoryView.contentY - categoryView.originY
660 readonly property real contentY: categoryView.contentY - categoryView.originY
661+ readonly property real scopeBackgroundLuminance: scopeBackground.visible ? Style.luminance(scopeBackground.color) : 1.0
660 y: -contentY - units.gu(5)
662 y: -contentY - units.gu(5)
661
663
662 onRefresh: {
664 onRefresh: {
qml/Dash/PullToRefreshScopeStyle.qml+1−1
@@ -48,7 +48,7 @@ PullToRefreshStyle {
48 anchors.horizontalCenter: parent.horizontalCenter
48 anchors.horizontalCenter: parent.horizontalCenter
49 horizontalAlignment: Text.AlignHCenter
49 horizontalAlignment: Text.AlignHCenter
50 verticalAlignment: Text.AlignVCenter
50 verticalAlignment: Text.AlignVCenter
51− color: UbuntuColors.jet
51+ color: styledItem.scopeBackgroundLuminance < 0.3 ? UbuntuColors.porcelain : UbuntuColors.jet
52 states: [
52 states: [
53 State {
53 State {
54 name: "pulling"
54 name: "pulling"