1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Add fadeIn workaround

lets do not call fade in every loop
This commit is contained in:
Elias Steurer 2023-03-02 13:17:30 +01:00
parent 7749486332
commit 580c95036e

View File

@ -8,6 +8,7 @@ Item {
property bool loops: Wallpaper.loops
property bool isPlaying: Wallpaper.isPlaying
property string fillMode: Wallpaper.fillMode
property bool fadeInDone: false
onFillModeChanged: {
// Convert Web based video modes to the limited Qt fillModes
if (fillMode === "cover" || fillMode === "stretch" || fillMode === "contain") {
@ -35,7 +36,8 @@ Item {
MediaPlayer {
id: mediaPlayer
onPlaybackStateChanged: {
if (mediaPlayer.playbackState == MediaPlayer.PlayingState) {
if (mediaPlayer.playbackState == MediaPlayer.PlayingState && !fadeInDone) {
fadeInDone = true
Wallpaper.requestFadeIn();
}
// Qt 6.5 workaround