Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
f76f85cd
Commit
f76f85cd
authored
Feb 24, 2021
by
Nate Graham
Browse files
[applets/mediacontroller] Clarify code for setting icon from current state
Nested ternaries make people's brains hurt.
parent
45da7235
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/mediacontroller/contents/ui/main.qml
View file @
f76f85cd
...
...
@@ -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
{
...
...
Mikel Johnson
@mikeljohnson
mentioned in merge request
!671 (closed)
·
Mar 02, 2021
mentioned in merge request
!671 (closed)
mentioned in merge request !671
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment