Commit f76f85cd authored by Nate Graham's avatar Nate Graham
Browse files

[applets/mediacontroller] Clarify code for setting icon from current state

Nested ternaries make people's brains hurt.
parent 45da7235
......@@ -167,9 +167,15 @@ Item {
Plasmoid.fullRepresentation: ExpandedRepresentation {}
Plasmoid.compactRepresentation: PlasmaCore.IconItem {
source: root.state === "playing" ? "media-playback-playing" :
root.state === "paused" ? "media-playback-paused" :
"media-playback-stopped"
source: {
if (root.state === "playing") {
return "media-playback-playing";
} else if (root.state === "paused") {
return "media-playback-paused";
} else {
return "media-playback-stopped";
}
}
active: compactMouse.containsMouse
MouseArea {
......
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