Commit 3bfdb125 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Color Picker] Show no color if none was picked

It always confuses me that the color picker falls back to Plasma's highlight color
when no color has been picked yet. I thought it was a good (looking) idea but it wasn't.
parent 37d9aef6
......@@ -36,7 +36,7 @@ Item {
readonly property bool isVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
readonly property color recentColor: plasmoid.configuration.history[0] || theme.highlightColor // nice default color
readonly property color recentColor: plasmoid.configuration.history[0] || "#00000000" // transparent as fallback
readonly property string defaultFormat: plasmoid.configuration.defaultFormat
Plasmoid.preferredRepresentation: Plasmoid.compactRepresentation
......@@ -215,8 +215,8 @@ Item {
width: {
var contrast = luminance(theme.viewBackgroundColor) / luminance(colorCircle.color) + 0.05;
// show border only if there's too little contrast to the surrounding view
if (contrast > 3) {
// show border only if there's too little contrast to the surrounding view or color is transparent
if (contrast > 3 && colorCircle.color.a > 0.5) {
return 0;
} else {
return Math.round(Math.max(units.devicePixelRatio, width / 20));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment