added a way to hide login button and set some margins
This commit is contained in:
19
Main.qml
19
Main.qml
@@ -41,14 +41,12 @@ Rectangle {
|
|||||||
model: screenModel
|
model: screenModel
|
||||||
Background {
|
Background {
|
||||||
id: background
|
id: background
|
||||||
x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height
|
x: geometry.x
|
||||||
|
y: geometry.y
|
||||||
|
width: geometry.width
|
||||||
|
height: geometry.height
|
||||||
source: config.background
|
source: config.background
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
onStatusChanged: {
|
|
||||||
if (status == Image.Error && source != config.defaultBackground) {
|
|
||||||
source = config.defaultBackground
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +135,7 @@ Rectangle {
|
|||||||
text: userModel.lastUser
|
text: userModel.lastUser
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: username_label.right
|
anchors.left: username_label.right
|
||||||
anchors.leftMargin: 0
|
anchors.leftMargin: config.usernameLeftMargin
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
font: textFont.name
|
font: textFont.name
|
||||||
@@ -197,7 +195,7 @@ Rectangle {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: parent.height // this sets button width, this way its a square
|
anchors.rightMargin: parent.height // this sets button width, this way its a square
|
||||||
anchors.left: password_label.right
|
anchors.left: password_label.right
|
||||||
anchors.leftMargin: 0
|
anchors.leftMargin: config.passwordLeftMargin
|
||||||
borderColor: "transparent"
|
borderColor: "transparent"
|
||||||
textColor: "white"
|
textColor: "white"
|
||||||
tooltipBG: "#25000000"
|
tooltipBG: "#25000000"
|
||||||
@@ -361,6 +359,11 @@ Rectangle {
|
|||||||
for (var k = 0; k < Math.ceil(Math.random() * 10) ; k++) {
|
for (var k = 0; k < Math.ceil(Math.random() * 10) ; k++) {
|
||||||
playlist.shuffle()
|
playlist.shuffle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.showLoginButton == "false") {
|
||||||
|
login_button.visible = false
|
||||||
|
password_input_box.anchors.rightMargin = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -30,18 +30,24 @@ If there is no active connection or the video can't be played the background wil
|
|||||||
|
|
||||||
### Changing settings in `theme.conf.user`
|
### Changing settings in `theme.conf.user`
|
||||||
|
|
||||||
You can change the font and the background.
|
You can change a few settings in this file
|
||||||
To set background image use `background`, for video playlists use `background_day` and `background_night`. Other keywords can be used, you just need to change the loaded config name near the end of the Main.qml file.
|
- `background` - default background image
|
||||||
|
- `background_day` and `background_night` - video playlists
|
||||||
|
- `displayFont` - font
|
||||||
|
- `showLoginButton` - if set to false will hide the login button
|
||||||
|
- `passwordLeftMargin` and `usernameLeftMargin` - set margin between input boxes and labels, some fonts are messy and allows fixing of overlap
|
||||||
|
|
||||||
Example:
|
Example my config (not the same as the screenshots):
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
[General]
|
[General]
|
||||||
background="image.jpg"
|
background_day=playlist_day.m3u
|
||||||
background_day="playlist_day.m3u"
|
background_night=playlist_night.m3u
|
||||||
background_night="playlist_night.m3u"
|
displayFont="Misc Fixed"
|
||||||
displayFont="Montserrat"
|
showLoginButton=false
|
||||||
|
passwordLeftMargin=15
|
||||||
|
usernameLeftMargin=15
|
||||||
```
|
```
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
[General]
|
[General]
|
||||||
background=background.jpg
|
background=background.jpg
|
||||||
|
background_day=playlist_day.m3u
|
||||||
|
background_night=playlist_night.m3u
|
||||||
displayFont="Droid Sans Mono for Powerline"
|
displayFont="Droid Sans Mono for Powerline"
|
||||||
|
showLoginButton=true
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
[General]
|
[General]
|
||||||
background_day=playlist_day.m3u
|
background_day=playlist_day.m3u
|
||||||
background_night=playlist_night.m3u
|
background_night=playlist_night.m3u
|
||||||
type=image
|
displayFont="Misc Fixed"
|
||||||
|
showLoginButton=false
|
||||||
|
passwordLeftMargin=15
|
||||||
|
usernameLeftMargin=15
|
||||||
|
|||||||
Reference in New Issue
Block a user