From bd4f93b96a611f6b31f7a86204d226c1eba9b523 Mon Sep 17 00:00:00 2001 From: eximus Date: Tue, 1 Aug 2017 20:48:02 +0100 Subject: [PATCH] added a way to position the interface --- Main.qml | 8 +++----- README.md | 4 ++-- theme.conf | 3 +++ theme.conf.user | 7 ------- 4 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 theme.conf.user diff --git a/Main.qml b/Main.qml index 59a5c31..a38d7df 100644 --- a/Main.qml +++ b/Main.qml @@ -86,10 +86,9 @@ Rectangle { Clock { id: clock - y: parent.height * 0.60 + y: parent.height * config.relativePositionY - clock.height / 2 + x: parent.width * config.relativePositionX - clock.width / 2 color: "white" - anchors.left: parent.left - anchors.leftMargin: parent.width * 0.1 timeFont.family: textFont.name dateFont.family: textFont.name } @@ -102,8 +101,7 @@ Rectangle { width: clock.width height: parent.height * 0.08 color: "transparent" - anchors.left: parent.left - anchors.leftMargin: parent.width * 0.1 + anchors.left: clock.left Rectangle { id: username_row diff --git a/README.md b/README.md index 8435148..4c0ed3e 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ You can change a few settings in this file - `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 +- `relativePositionX` and `relativePositionY` - position the login text box and clock -Example my config (not the same as the screenshots): - +Example config (not the same as the screenshots): ``` [General] diff --git a/theme.conf b/theme.conf index 78e13fa..6b088c5 100644 --- a/theme.conf +++ b/theme.conf @@ -4,3 +4,6 @@ background_day=playlist_day.m3u background_night=playlist_night.m3u displayFont="Droid Sans Mono for Powerline" showLoginButton=true +relativePositionX=0.3 +relativePositionY=0.7 + diff --git a/theme.conf.user b/theme.conf.user deleted file mode 100644 index 522ed1a..0000000 --- a/theme.conf.user +++ /dev/null @@ -1,7 +0,0 @@ -[General] -background_day=playlist_day.m3u -background_night=playlist_night.m3u -displayFont="Misc Fixed" -showLoginButton=false -passwordLeftMargin=15 -usernameLeftMargin=15