|
19 | 19 | */ |
20 | 20 |
|
21 | 21 | import QtQuick |
| 22 | +import QtQuick.Layouts |
22 | 23 | import org.kde.plasma.core as PlasmaCore |
23 | 24 | import org.kde.plasma.plasma5support as P5Support |
24 | 25 | import org.kde.plasma.plasmoid |
25 | 26 | import Qt5Compat.GraphicalEffects |
26 | 27 | import org.kde.plasma.extras as PlasmaExtras |
27 | 28 | import org.kde.kirigami as Kirigami |
| 29 | +import org.kde.plasma.components as PlasmaComponents |
28 | 30 | import "code/utils.js" as Utils |
29 | 31 | import "code/enum.js" as Enum |
30 | 32 |
|
@@ -77,6 +79,9 @@ WallpaperItem { |
77 | 79 | return (shouldPlay && !batteryPausesVideo && !screenLocked && !screenIsOff && !effectPauseVideo) || effectPlayVideo; |
78 | 80 | } |
79 | 81 | property bool shouldBlur: { |
| 82 | + if (videosConfig.length == 0) { |
| 83 | + return false; |
| 84 | + } |
80 | 85 | let blur = false; |
81 | 86 | switch (main.configuration.BlurMode) { |
82 | 87 | case Enum.BlurMode.MaximizedOrFullScreen: |
@@ -259,23 +264,76 @@ WallpaperItem { |
259 | 264 | resumeLastVideo: main.configuration.ResumeLastVideo |
260 | 265 | } |
261 | 266 |
|
| 267 | + FastBlur { |
| 268 | + source: player |
| 269 | + radius: main.showBlur ? main.configuration.BlurRadius : 0 |
| 270 | + visible: radius !== 0 |
| 271 | + anchors.fill: parent |
| 272 | + Behavior on radius { |
| 273 | + NumberAnimation { |
| 274 | + duration: main.blurAnimationDuration |
| 275 | + } |
| 276 | + } |
| 277 | + } |
| 278 | + |
262 | 279 | PlasmaExtras.PlaceholderMessage { |
263 | | - visible: videosConfig.length == 0 |
| 280 | + visible: main.videosConfig.length == 0 |
264 | 281 | anchors.centerIn: parent |
265 | 282 | width: parent.width - Kirigami.Units.gridUnit * 2 |
266 | 283 | iconName: "video-symbolic" |
267 | 284 | text: i18n("No video source \n" + main.videoUrls) |
268 | 285 | } |
269 | | - } |
270 | 286 |
|
271 | | - FastBlur { |
272 | | - source: player |
273 | | - radius: showBlur ? main.configuration.BlurRadius : 0 |
274 | | - visible: radius !== 0 |
275 | | - anchors.fill: parent |
276 | | - Behavior on radius { |
277 | | - NumberAnimation { |
278 | | - duration: blurAnimationDuration |
| 287 | + ColumnLayout { |
| 288 | + id: root |
| 289 | + Item { |
| 290 | + Layout.preferredWidth: 1 |
| 291 | + Layout.preferredHeight: 100 |
| 292 | + } |
| 293 | + Kirigami.AbstractCard { |
| 294 | + Layout.margins: Kirigami.Units.largeSpacing |
| 295 | + contentItem: ColumnLayout { |
| 296 | + id: content |
| 297 | + PlasmaComponents.Label { |
| 298 | + text: main.currentSource.filename |
| 299 | + } |
| 300 | + PlasmaComponents.Label { |
| 301 | + text: "currentVideoIndex " + main.currentVideoIndex |
| 302 | + } |
| 303 | + PlasmaComponents.Label { |
| 304 | + text: "changeWallpaperMode " + main.changeWallpaperMode |
| 305 | + } |
| 306 | + PlasmaComponents.Label { |
| 307 | + text: "crossfade " + main.crossfadeEnabled |
| 308 | + } |
| 309 | + PlasmaComponents.Label { |
| 310 | + text: "crossfadeDuration " + player.crossfadeDuration + " (" + player.crossfadeMinDurationLast + ", " + player.crossfadeMinDurationCurrent + ")" |
| 311 | + } |
| 312 | + PlasmaComponents.Label { |
| 313 | + text: "multipleVideos " + player.multipleVideos |
| 314 | + } |
| 315 | + PlasmaComponents.Label { |
| 316 | + text: "player " + player.player.objectName |
| 317 | + } |
| 318 | + PlasmaComponents.Label { |
| 319 | + text: "media status " + player.player.mediaStatus |
| 320 | + } |
| 321 | + PlasmaComponents.Label { |
| 322 | + text: "player1 playing " + player.player1.playing |
| 323 | + } |
| 324 | + PlasmaComponents.Label { |
| 325 | + text: "player2 playing " + player.player2.playing |
| 326 | + } |
| 327 | + PlasmaComponents.Label { |
| 328 | + text: "position " + player.player.position |
| 329 | + } |
| 330 | + PlasmaComponents.Label { |
| 331 | + text: "duration " + player.player.duration |
| 332 | + } |
| 333 | + PlasmaComponents.Label { |
| 334 | + text: "resumeLastVideo" + player.resumeLastVideo |
| 335 | + } |
| 336 | + } |
279 | 337 | } |
280 | 338 | } |
281 | 339 | } |
|
0 commit comments