on xenial help sign in
Use the new getTextColor method from ScopeStyle and increas threshold for dark dropshadow
ebd8488Michał Sawicz
qml/Dash/DashNavigation.qml+2−5
@@ -40,10 +40,7 @@ Item {
40
40
41 QtObject {
41 QtObject {
42 id: d
42 id: d
43− readonly property color foregroundColor: {
43+ readonly property color foregroundColor: scopeStyle.getTextColor(background.luminance)
44− if (scopeStyle) return background.luminance > scopeStyle.threshold ? scopeStyle.dark : ScopeStyle.light;
45− else return background.luminance > 0.7 ? Theme.palette.normal.baseText : "white"
46− }
47 readonly property bool bothVisible: altNavigationButton.visible && navigationButton.visible
44 readonly property bool bothVisible: altNavigationButton.visible && navigationButton.visible
48 readonly property real navigationWidth: root.width >= units.gu(60) ? units.gu(40) : root.width
45 readonly property real navigationWidth: root.width >= units.gu(60) ? units.gu(40) : root.width
49 readonly property real buttonWidth: navigationWidth / (bothVisible ? 2 : 1)
46 readonly property real buttonWidth: navigationWidth / (bothVisible ? 2 : 1)
@@ -66,7 +63,7 @@ Item {
66
63
67 Image {
64 Image {
68 fillMode: Image.Stretch
65 fillMode: Image.Stretch
69− source: scopeStyle.backgroundLuminance > 0.7 ? "graphics/navigation_shadow.png" : "graphics/navigation_shadow_light.png"
66+ source: scopeStyle.backgroundLuminance > 0.2 ? "graphics/navigation_shadow.png" : "graphics/navigation_shadow_light.png"
70 anchors { top: parent.bottom; left: parent.left; right: parent.right }
67 anchors { top: parent.bottom; left: parent.left; right: parent.right }
71 }
68 }
72
69