From 19242bd7bae31415d73b396500d76afce8c1363e Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Tue, 30 May 2023 17:32:09 +0800 Subject: [PATCH 1/3] Qt 5.15 deprecated: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Fix deprecated function code https://forum.qt.io/topic/115389/qt-5-15-depricated-qml-connections-implicitly-defined-onfoo-properties-in-connections-are-deprecated --- Main.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Main.qml b/Main.qml index 58b6458..2b8bec6 100644 --- a/Main.qml +++ b/Main.qml @@ -21,10 +21,10 @@ Rectangle { // Set SDDM actions Connections { target: sddm - onLoginSucceeded: { + function onLoginSucceeded() { } - onLoginFailed: { + function onLoginFailed() { error_message.color = "#dc322f" error_message.text = textConstants.loginFailed } @@ -439,7 +439,9 @@ Rectangle { Connections { target: keyboard - onCurrentLayoutChanged: combo.index = keyboard.currentLayout + function onCurrentLayoutChanged() { + combo.index = keyboard.currentLayout + } } rowDelegate: Rectangle { From bbfcab9cc9bac6be057f0cb388daacd27f374635 Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Tue, 30 May 2023 22:05:14 +0800 Subject: [PATCH 2/3] WallpaperFader.qml:132: ReferenceError: Units is not defined Fix duration ReferenceError --- components/WallpaperFader.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/WallpaperFader.qml b/components/WallpaperFader.qml index 7369c49..412e9a8 100644 --- a/components/WallpaperFader.qml +++ b/components/WallpaperFader.qml @@ -128,13 +128,13 @@ Item { NumberAnimation { target: mainStack property: "opacity" - duration: units.longDuration + duration: 500 easing.type: Easing.InOutQuad } NumberAnimation { target: footer property: "opacity" - duration: units.longDuration + duration: 500 easing.type: Easing.InOutQuad } } From b38c9a39e43f2d96eb9cd3c68ac879f9464b1b8c Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Tue, 30 May 2023 22:18:35 +0800 Subject: [PATCH 3/3] Allow customize daytime start and end duration --- Main.qml | 2 +- README.md | 1 + theme.conf | 2 ++ theme.conf.user | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Main.qml b/Main.qml index 2b8bec6..0b14f23 100644 --- a/Main.qml +++ b/Main.qml @@ -507,7 +507,7 @@ Rectangle { // load and randomize playlist var time = parseInt(new Date().toLocaleTimeString(Qt.locale(),'h')) - if ( time >= 5 && time <= 17 ) { + if ( time >= config.day_time_start && time <= config.day_time_end ) { playlist1.load(Qt.resolvedUrl(config.background_vid_day), 'm3u') playlist2.load(Qt.resolvedUrl(config.background_vid_day), 'm3u') image1.source = config.background_img_day diff --git a/README.md b/README.md index d3d4061..975f112 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ done < playlist_file ### Changing settings in `theme.conf.user` You can change a few settings in this file +- `day_time_start` and `day_time_end` - set your day start/end time - `background_img_day` and `background_img_night` - default background day/night image - `background_vid_day` and `background_vid_night` - video playlists - `displayFont` - font diff --git a/theme.conf b/theme.conf index 6f27788..7942232 100644 --- a/theme.conf +++ b/theme.conf @@ -1,4 +1,6 @@ [General] +day_time_start=7 +day_time_start=19 background_img_day=background.jpg background_img_night=background.jpg background_vid_day=playlists/day.m3u diff --git a/theme.conf.user b/theme.conf.user index 110ff11..b23fe21 100644 --- a/theme.conf.user +++ b/theme.conf.user @@ -1,4 +1,6 @@ [General] +day_time_start=7 +day_time_start=19 background_vid_day=playlists/day.m3u background_vid_night=playlists/night.m3u displayFont="Misc Fixed"