added a extra way to play local video;
change the postition of login-faild-msg; added a button to clear the password; change the color of session and us-layout font
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
|||||||
Main.qmlc
|
Main.qmlc
|
||||||
|
|
||||||
|
/playlist_videos/*
|
||||||
|
!/playlist_videos/*.md
|
||||||
|
|||||||
61
Main.qml
61
Main.qml
@@ -150,16 +150,6 @@ Rectangle {
|
|||||||
|
|
||||||
KeyNavigation.backtab: password_input_box; KeyNavigation.tab: password_input_box
|
KeyNavigation.backtab: password_input_box; KeyNavigation.tab: password_input_box
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
id: error_message
|
|
||||||
height: parent.height
|
|
||||||
font.family: textFont.name
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "white"
|
|
||||||
anchors.left: username_input_box.left
|
|
||||||
anchors.leftMargin: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -191,7 +181,7 @@ Rectangle {
|
|||||||
color: "#25000000"
|
color: "#25000000"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: parent.height // this sets button width, this way its a square
|
anchors.rightMargin: 2*parent.height // this sets button width, this way its a square
|
||||||
anchors.left: password_label.right
|
anchors.left: password_label.right
|
||||||
anchors.leftMargin: config.passwordLeftMargin
|
anchors.leftMargin: config.passwordLeftMargin
|
||||||
borderColor: "transparent"
|
borderColor: "transparent"
|
||||||
@@ -210,17 +200,40 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: username_input_box; KeyNavigation.tab: login_button
|
KeyNavigation.backtab: username_input_box; KeyNavigation.tab: login_button
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: clear_passwd_button
|
||||||
|
height: parent.height
|
||||||
|
//color: "#393939"
|
||||||
|
color: "#25000000"
|
||||||
|
text: "x"
|
||||||
|
font: textFont.name
|
||||||
|
|
||||||
|
border.color: "#00000000"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: password_input_box.right
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
anchors.rightMargin: parent.height
|
||||||
|
|
||||||
|
disabledColor: "#dc322f"
|
||||||
|
activeColor: "#268bd2"
|
||||||
|
pressedColor: "#2aa198"
|
||||||
|
|
||||||
|
onClicked: password_input_box.text=''
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: login_button
|
id: login_button
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: "#393939"
|
color: "#393939"
|
||||||
text: ">"
|
text: ">"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
border.color: "#00000000"
|
border.color: "#00000000"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
//anchors.left: password_input_box.right
|
||||||
|
anchors.left: clear_passwd_button.right
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 0
|
//anchors.leftMargin: 0
|
||||||
anchors.left: password_input_box.right
|
//anchors.rightMargin: 0
|
||||||
anchors.leftMargin: 0
|
|
||||||
disabledColor: "#dc322f"
|
disabledColor: "#dc322f"
|
||||||
activeColor: "#268bd2"
|
activeColor: "#268bd2"
|
||||||
pressedColor: "#2aa198"
|
pressedColor: "#2aa198"
|
||||||
@@ -231,10 +244,20 @@ Rectangle {
|
|||||||
|
|
||||||
KeyNavigation.backtab: password_input_box; KeyNavigation.tab: reboot_button
|
KeyNavigation.backtab: password_input_box; KeyNavigation.tab: reboot_button
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: error_message
|
||||||
|
height: parent.height
|
||||||
|
font.family: textFont.name
|
||||||
|
font.pixelSize: 12
|
||||||
|
color: "white"
|
||||||
|
anchors.top: password_input_box.bottom
|
||||||
|
anchors.left: password_input_box.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Top Bar
|
// Top Bar
|
||||||
@@ -260,7 +283,8 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
arrowColor: "transparent"
|
arrowColor: "transparent"
|
||||||
textColor: "white"
|
//textColor: "white"
|
||||||
|
textColor: "#505050"
|
||||||
borderColor: "transparent"
|
borderColor: "transparent"
|
||||||
hoverColor: "#5692c4"
|
hoverColor: "#5692c4"
|
||||||
|
|
||||||
@@ -305,7 +329,8 @@ Rectangle {
|
|||||||
text: modelItem ? modelItem.modelData.shortName : "zz"
|
text: modelItem ? modelItem.modelData.shortName : "zz"
|
||||||
font.family: textFont.name
|
font.family: textFont.name
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
color: "white"
|
//color: "white"
|
||||||
|
color: "#505050"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyNavigation.backtab: session; KeyNavigation.tab: username_input_box
|
KeyNavigation.backtab: session; KeyNavigation.tab: username_input_box
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ The theme can be tested by running `sddm-greeter --theme <path-to-this-repositor
|
|||||||
|
|
||||||
### Other notes
|
### Other notes
|
||||||
|
|
||||||
|
- video
|
||||||
This theme streams the HD videos so a good internet connection is necessary.
|
This theme streams the HD videos so a good internet connection is necessary.
|
||||||
If there is no active connection or the video can't be played the background will fallback to the image background.jpg
|
If there is no active connection or the video can't be played the background will fallback to the image background.jpg
|
||||||
|
|
||||||
@@ -50,6 +51,13 @@ passwordLeftMargin=15
|
|||||||
usernameLeftMargin=15
|
usernameLeftMargin=15
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to use the local videos but not via internet, you can put your day-videos and night-videos to `playlist_videos/day` and `playlist_videos/night` directory and then run the code below:
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./generate_playlist.sh local
|
||||||
|
```
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$1" == "local" ]; then
|
||||||
|
python -c '
|
||||||
|
import os
|
||||||
|
day=open("playlist_day.m3u", "w")
|
||||||
|
night=open("playlist_night.m3u", "w")
|
||||||
|
for x in os.listdir("./playlist_videos/day"):
|
||||||
|
day.write("./playlist_videos/day/" + x + "\n")
|
||||||
|
for x in os.listdir("./playlist_videos/night"):
|
||||||
|
night.write("./playlist_videos/night/" + x + "\n")
|
||||||
|
day.close()
|
||||||
|
night.close()
|
||||||
|
'
|
||||||
|
echo "Generated local video playlist successful!"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
curl 'http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/entries.json' 2>/dev/null | python2 -c '
|
curl 'http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/entries.json' 2>/dev/null | python2 -c '
|
||||||
import sys, json;
|
import sys, json;
|
||||||
day=open("playlist_day.m3u", "w")
|
day=open("playlist_day.m3u", "w")
|
||||||
@@ -13,3 +31,5 @@ for x in json.load(sys.stdin):
|
|||||||
day.close()
|
day.close()
|
||||||
night.close()
|
night.close()
|
||||||
'
|
'
|
||||||
|
echo "Generated internet video playlist successful!"
|
||||||
|
fi
|
||||||
|
|||||||
0
playlist_videos/put-your-videos-here.md
Normal file
0
playlist_videos/put-your-videos-here.md
Normal file
@@ -2,8 +2,9 @@
|
|||||||
background=background.jpg
|
background=background.jpg
|
||||||
background_day=playlist_day.m3u
|
background_day=playlist_day.m3u
|
||||||
background_night=playlist_night.m3u
|
background_night=playlist_night.m3u
|
||||||
displayFont="Droid Sans Mono for Powerline"
|
displayFont="DejaVu Sans"
|
||||||
showLoginButton=true
|
showLoginButton=true
|
||||||
|
passwordLeftMargin=15
|
||||||
|
usernameLeftMargin=15
|
||||||
relativePositionX=0.3
|
relativePositionX=0.3
|
||||||
relativePositionY=0.7
|
relativePositionY=0.7
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user