Verified Commit 181a7f35 authored by Fushan Wen's avatar Fushan Wen
Browse files

wallpapers/image: set duration to 1 to avoid flickering

When Image is in a Rectangle, though the image is set to fill the
rectangle, the rectangle can still be seen before the image is fully

If asynchronous is set to true, the exact moment Image.status becomes
Image.Ready, the image doesn't really show up in the window.

To verify the behavior, run qml main.qml in the attachment and click
the window area (will switch between the two images), see if every
time the color of rectangle shows up before the image.

See also:

(cherry picked from commit 178503d9)
parent d046d4e5
Pipeline #235098 passed with stage
in 6 minutes and 23 seconds
......@@ -147,7 +147,7 @@ QQC2.StackView {
"sourceSize": root.sourceSize,
"color": root.configColor,
"blur": root.blur,
"opacity": doesSkipAnimation ? 1: 0,
"opacity": 0,
"width": root.width,
"height": root.height,
......@@ -177,13 +177,13 @@ QQC2.StackView {
replaceEnter: Transition {
enabled: !root.doesSkipAnimation
OpacityAnimator {
id: replaceEnterOpacityAnimator
from: 0
to: 1
// The value is to keep compatible with the old feeling defined by "TransitionAnimationDuration" (default: 1000)
duration: Math.round(PlasmaCore.Units.veryLongDuration * 2.5)
// 1 is HACK for to avoid flickering
duration: root.doesSkipAnimation ? 1 : Math.round(PlasmaCore.Units.veryLongDuration * 2.5)
// Keep the old image around till the new one is fully faded in
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