on xenial help sign in
Fix threshold calculation as discussed with Saviq
6e114c1Albert Astals
plugins/Dash/ScopeStyle.qml+2−2
@@ -43,9 +43,9 @@ QtObject {
43
43
44 /*! \brief Luminance threshold for switching between fore and background color
44 /*! \brief Luminance threshold for switching between fore and background color
45
45
46− \note If background colour is not fully opaque, it's not taken into account.
46+ \note If background colour is not fully opaque, the defaultLightLuminance it's taken into account instead of it.
47 */
47 */
48− readonly property real threshold: background.a !== 1.0 ? d.foregroundLuminance : (d.foregroundLuminance + d.backgroundLuminance) / 2
48+ readonly property real threshold: background.a !== 1.0 ? (d.foregroundLuminance + d.defaultLightLuminance) / 2: (d.foregroundLuminance + d.backgroundLuminance) / 2
49
49
50 /*! \brief The lighter of foreground and background colors
50 /*! \brief The lighter of foreground and background colors
51
51