Skip to content
GitLab
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
401bf292
Commit
401bf292
authored
Apr 23, 2022
by
Fushan Wen
Committed by
Nate Graham
Apr 25, 2022
Browse files
applets/mediacontroller: Use PopTransition for old image when albumArt is unavailable
CCBUG: 446862
parent
da9bc475
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
View file @
401bf292
...
...
@@ -156,7 +156,7 @@ PlasmaExtras.Representation {
}
anchors.centerIn
:
parent
visible
:
(
exitTransition
.
running
||
albumArt
.
hasImage
)
&&
!
softwareRendering
visible
:
(
exitTransition
.
running
||
popExitTransition
.
running
||
albumArt
.
hasImage
)
&&
!
softwareRendering
layer.enabled
:
!
softwareRendering
layer.effect
:
HueSaturation
{
...
...
@@ -235,6 +235,16 @@ PlasmaExtras.Representation {
}
}
popExit
:
Transition
{
id
:
popExitTransition
OpacityAnimator
{
from
:
1
to
:
0
duration
:
PlasmaCore
.
Units
.
longDuration
}
}
Connections
{
enabled
:
Plasmoid
.
expanded
target
:
root
...
...
@@ -259,7 +269,7 @@ PlasmaExtras.Representation {
function
loadAlbumArt
()
{
if
(
!
root
.
albumArt
)
{
albumArt
.
clear
(
QQC2
.
StackView
.
Replace
Transition
);
albumArt
.
clear
(
QQC2
.
StackView
.
Pop
Transition
);
return
;
}
...
...
@@ -274,6 +284,10 @@ PlasmaExtras.Representation {
}
if
(
pendingImage
.
status
===
Image
.
Null
||
pendingImage
.
status
===
Image
.
Error
)
{
pendingImage
.
destroy
();
// Also clear the old image
albumArt
.
clear
(
QQC2
.
StackView
.
PopTransition
);
return
;
}
albumArt
.
replace
(
pendingImage
,
{},
QQC2
.
StackView
.
ReplaceTransition
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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