on xenial help sign in
Fix threshold calculation as discussed with Saviq
commit6e114c149b52c1d962c48c2a65037da83ca81ec9 authorAlbert Astals <albert.astals@canonical.com> dateWed 23 Jul 2014, 12:54 (12 years ago) parenta093667
1 file changed+2−2
plugins/Dash/ScopeStyle.qml+2−2
plugins/Dash/ScopeStyle.qml+2−2
@@ -43,9 +43,9 @@ QtObject {
4343
4444 /*! \brief Luminance threshold for switching between fore and background color
4545
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.
4747 */
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
4949
5050 /*! \brief The lighter of foreground and background colors
5151