Merge pull request #44 from hat3ph/branch1
Fix some code errors and allow to customize day start/end time
This commit is contained in:
10
Main.qml
10
Main.qml
@@ -21,10 +21,10 @@ Rectangle {
|
|||||||
// Set SDDM actions
|
// Set SDDM actions
|
||||||
Connections {
|
Connections {
|
||||||
target: sddm
|
target: sddm
|
||||||
onLoginSucceeded: {
|
function onLoginSucceeded() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoginFailed: {
|
function onLoginFailed() {
|
||||||
error_message.color = "#dc322f"
|
error_message.color = "#dc322f"
|
||||||
error_message.text = textConstants.loginFailed
|
error_message.text = textConstants.loginFailed
|
||||||
}
|
}
|
||||||
@@ -439,7 +439,9 @@ Rectangle {
|
|||||||
Connections {
|
Connections {
|
||||||
target: keyboard
|
target: keyboard
|
||||||
|
|
||||||
onCurrentLayoutChanged: combo.index = keyboard.currentLayout
|
function onCurrentLayoutChanged() {
|
||||||
|
combo.index = keyboard.currentLayout
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rowDelegate: Rectangle {
|
rowDelegate: Rectangle {
|
||||||
@@ -505,7 +507,7 @@ Rectangle {
|
|||||||
|
|
||||||
// load and randomize playlist
|
// load and randomize playlist
|
||||||
var time = parseInt(new Date().toLocaleTimeString(Qt.locale(),'h'))
|
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')
|
playlist1.load(Qt.resolvedUrl(config.background_vid_day), 'm3u')
|
||||||
playlist2.load(Qt.resolvedUrl(config.background_vid_day), 'm3u')
|
playlist2.load(Qt.resolvedUrl(config.background_vid_day), 'm3u')
|
||||||
image1.source = config.background_img_day
|
image1.source = config.background_img_day
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ done < playlist_file
|
|||||||
### Changing settings in `theme.conf.user`
|
### Changing settings in `theme.conf.user`
|
||||||
|
|
||||||
You can change a few settings in this file
|
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_img_day` and `background_img_night` - default background day/night image
|
||||||
- `background_vid_day` and `background_vid_night` - video playlists
|
- `background_vid_day` and `background_vid_night` - video playlists
|
||||||
- `displayFont` - font
|
- `displayFont` - font
|
||||||
|
|||||||
@@ -128,13 +128,13 @@ Item {
|
|||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
target: mainStack
|
target: mainStack
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
duration: units.longDuration
|
duration: 500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
target: footer
|
target: footer
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
duration: units.longDuration
|
duration: 500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
[General]
|
[General]
|
||||||
|
day_time_start=7
|
||||||
|
day_time_start=19
|
||||||
background_img_day=background.jpg
|
background_img_day=background.jpg
|
||||||
background_img_night=background.jpg
|
background_img_night=background.jpg
|
||||||
background_vid_day=playlists/day.m3u
|
background_vid_day=playlists/day.m3u
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
[General]
|
[General]
|
||||||
|
day_time_start=7
|
||||||
|
day_time_start=19
|
||||||
background_vid_day=playlists/day.m3u
|
background_vid_day=playlists/day.m3u
|
||||||
background_vid_night=playlists/night.m3u
|
background_vid_night=playlists/night.m3u
|
||||||
displayFont="Misc Fixed"
|
displayFont="Misc Fixed"
|
||||||
|
|||||||
Reference in New Issue
Block a user