From bf8d0109254ae94fd64cb3154152fd9be1abeaf2 Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Wed, 28 Jul 2021 11:16:15 +0800 Subject: [PATCH 1/4] Update Main.qml Allow to set background image rotation by day and night --- Main.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Main.qml b/Main.qml index a33f0a2..58b6458 100644 --- a/Main.qml +++ b/Main.qml @@ -43,8 +43,9 @@ Rectangle { // Set Background Image Image { + id: image1 anchors.fill: parent - source: config.background + //source: config.background fillMode: Image.PreserveAspectCrop } @@ -505,11 +506,13 @@ Rectangle { // load and randomize playlist var time = parseInt(new Date().toLocaleTimeString(Qt.locale(),'h')) if ( time >= 5 && time <= 17 ) { - playlist1.load(Qt.resolvedUrl(config.background_day), 'm3u') - playlist2.load(Qt.resolvedUrl(config.background_day), 'm3u') + playlist1.load(Qt.resolvedUrl(config.background_vid_day), 'm3u') + playlist2.load(Qt.resolvedUrl(config.background_vid_day), 'm3u') + image1.source = config.background_img_day } else { - playlist1.load(Qt.resolvedUrl(config.background_night), 'm3u') - playlist2.load(Qt.resolvedUrl(config.background_night), 'm3u') + playlist1.load(Qt.resolvedUrl(config.background_vid_night), 'm3u') + playlist2.load(Qt.resolvedUrl(config.background_vid_night), 'm3u') + image1.source = config.background_img_night } for (var k = 0; k < Math.ceil(Math.random() * 10) ; k++) { From 0081a591b30afb4fa66e11e9a06d4068871d0e05 Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Wed, 28 Jul 2021 21:12:46 +0800 Subject: [PATCH 2/4] Update theme.conf --- theme.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/theme.conf b/theme.conf index e0c74d0..6f27788 100644 --- a/theme.conf +++ b/theme.conf @@ -1,7 +1,8 @@ [General] -background=background.jpg -background_day=playlists/day.m3u -background_night=playlists/night.m3u +background_img_day=background.jpg +background_img_night=background.jpg +background_vid_day=playlists/day.m3u +background_vid_night=playlists/night.m3u displayFont="Droid Sans Mono for Powerline" showLoginButton=true passwordLeftMargin=15 From 28e034fd3e49491f12ea7abbaddee6c971839187 Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Wed, 28 Jul 2021 21:13:14 +0800 Subject: [PATCH 3/4] Update theme.conf.user --- theme.conf.user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme.conf.user b/theme.conf.user index 30a50f5..110ff11 100644 --- a/theme.conf.user +++ b/theme.conf.user @@ -1,6 +1,6 @@ [General] -background_day=playlists/day.m3u -background_night=playlists/night.m3u +background_vid_day=playlists/day.m3u +background_vid_night=playlists/night.m3u displayFont="Misc Fixed" passwordLeftMargin=15 relativePositionX=0.5 From 57c59eb422ec3502b35b25dfe492a0905c703b4b Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Wed, 28 Jul 2021 21:15:18 +0800 Subject: [PATCH 4/4] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b4024b..b147101 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ done < playlist_file ### Changing settings in `theme.conf.user` You can change a few settings in this file -- `background` - default background image -- `background_day` and `background_night` - video playlists +- `background_img_day` and `background_img_night` - default background day/night image +- `background_vid_day` and `background_vid_night` - video playlists - `displayFont` - font - `showLoginButton` - if set to false will hide the login button - `showClearPasswordButton` - if set to false will hide the clear password button that appears when text is inputed @@ -63,8 +63,8 @@ Example config (not the same as the screenshots): ``` [General] -background_day=playlist_day.m3u -background_night=playlist_night.m3u +background_vid_day=playlist_day.m3u +background_vid_night=playlist_night.m3u displayFont="Misc Fixed" showLoginButton=false passwordLeftMargin=15