2121import QtQuick
2222import QtQuick.Layouts
2323import org.kde.plasma.core as PlasmaCore
24+ import org.kde.ksvg as KSvg
2425import org.kde.plasma.plasma5support as P5Support
2526import org.kde.plasma.plasmoid
2627import Qt5Compat.GraphicalEffects
@@ -253,6 +254,7 @@ WallpaperItem {
253254 anchors .fill : parent
254255 muted: main .muteAudio
255256 lastVideoPosition: main .configuration .LastVideoPosition
257+ visible: main .videosConfig .length !== 0
256258 onSetNextSource: {
257259 main .nextVideo ();
258260 }
@@ -265,58 +267,72 @@ WallpaperItem {
265267 changeWallpaperTimerMinutes: main .changeWallpaperTimerMinutes
266268 changeWallpaperTimerHours: main .changeWallpaperTimerHours
267269 fillMode: main .configuration .FillMode
270+ fillBlur: main .configuration .FillBlur && ! main .batteryDisablesBlur
271+ fillBlurRadius: main .configuration .FillBlurRadius
268272 volume: main .volume
269273 playbackRate: main .playbackRate
270274 resumeLastVideo: main .configuration .ResumeLastVideo
271275 }
272-
273- FastBlur {
274- source : player
275- radius : main . showBlur ? main . configuration . BlurRadius : 0
276- visible : radius !== 0
277- anchors . fill : parent
278- Behavior on radius {
279- NumberAnimation {
280- duration : main . blurAnimationDuration
281- }
276+ }
277+ FastBlur {
278+ id : mainBlur
279+ source : background
280+ radius : main . showBlur ? main . configuration . BlurRadius : 0
281+ visible : radius !== 0
282+ anchors . fill : background
283+ Behavior on radius {
284+ NumberAnimation {
285+ duration : main . blurAnimationDuration
282286 }
283287 }
288+ }
284289
285- PlasmaExtras .PlaceholderMessage {
286- visible: main .videosConfig .length == 0
287- anchors .centerIn : parent
288- width: parent .width - Kirigami .Units .gridUnit * 2
289- iconName: " video-symbolic"
290- text: i18n (" No video source \n " + main .videoUrls )
291- }
290+ PlasmaExtras .PlaceholderMessage {
291+ visible: main .videosConfig .length == 0
292+ anchors .centerIn : parent
293+ width: parent .width - Kirigami .Units .gridUnit * 2
294+ iconName: " video-symbolic"
295+ text: i18n (" No video source \n " + main .videoUrls )
296+ }
292297
298+ Item {
299+ visible: main .debugEnabled
300+ implicitWidth: debugArea .implicitWidth + debugArea .anchors .leftMargin + debugArea .anchors .rightMargin
301+ implicitHeight: debugArea .implicitHeight + debugArea .anchors .topMargin + debugArea .anchors .bottomMargin
302+ x: 40
303+ y: 100
304+ KSvg .FrameSvgItem {
305+ id: frameSvg
306+ imagePath: " widgets/background"
307+ anchors .fill : parent
308+ }
293309 ColumnLayout {
294- id: root
295- visible: main .debugEnabled
296- Item {
297- Layout .preferredWidth : 1
298- Layout .preferredHeight : 100
310+ id: debugArea
311+ anchors {
312+ fill: parent
313+ leftMargin: frameSvg .fixedMargins .left
314+ rightMargin: frameSvg .fixedMargins .right
315+ topMargin: frameSvg .fixedMargins .top
316+ bottomMargin: frameSvg .fixedMargins .bottom
299317 }
300- Kirigami . AbstractCard {
318+ PlasmaComponents . Label {
301319 Layout .margins : Kirigami .Units .largeSpacing
302- contentItem: PlasmaComponents .Label {
303- text: {
304- let text = ` filename: ${ main .currentSource .filename } \n ` ;
305- text += ` loops: ${ main .currentSource .loop ?? false }\n` ;
306- text += ` currentVideoIndex ${main .currentVideoIndex }\n` ;
307- text += ` changeWallpaperMode ${main .changeWallpaperMode }\n` ;
308- text += ` crossfade ${main .crossfadeEnabled }\n` ;
309- text += ` crossfadeDuration ${player .crossfadeDuration } ${player .crossfadeMinDurationLast } ${player .crossfadeMinDurationCurrent }\n` ;
310- text += ` multipleVideos ${player .multipleVideos }\n` ;
311- text += ` player ${player .player .objectName }\n` ;
312- text += ` media status ${player .player .mediaStatus }\n` ;
313- text += ` player1 playing ${player .player1 .playing }\n` ;
314- text += ` player2 playing ${player .player2 .playing }\n` ;
315- text += ` position ${player .player .position }\n` ;
316- text += ` duration ${player .player .duration }\n` ;
317- text += ` resumeLastVideo ${player .resumeLastVideo }` ;
318- return text;
319- }
320+ text: {
321+ let text = ` filename: ${ main .currentSource .filename } \n ` ;
322+ text += ` loops: ${ main .currentSource .loop ?? false }\n` ;
323+ text += ` currentVideoIndex ${main .currentVideoIndex }\n` ;
324+ text += ` changeWallpaperMode ${main .changeWallpaperMode }\n` ;
325+ text += ` crossfade ${main .crossfadeEnabled }\n` ;
326+ text += ` crossfadeDuration ${player .crossfadeDuration } ${player .crossfadeMinDurationLast } ${player .crossfadeMinDurationCurrent }\n` ;
327+ text += ` multipleVideos ${player .multipleVideos }\n` ;
328+ text += ` player ${player .player .objectName }\n` ;
329+ text += ` media status ${player .player .mediaStatus }\n` ;
330+ text += ` player1 playing ${player .player1 .playing }\n` ;
331+ text += ` player2 playing ${player .player2 .playing }\n` ;
332+ text += ` position ${player .player .position }\n` ;
333+ text += ` duration ${player .player .duration }\n` ;
334+ text += ` resumeLastVideo ${player .resumeLastVideo }` ;
335+ return text;
320336 }
321337 }
322338 }
0 commit comments