diff --git a/README.md b/README.md index e51bf45..3536630 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,15 @@ Create file `theme.conf.user` in theme folder. See `slice/theme.conf` for refere ### Available options -* `font` - changes overall font. Defaults to `Roboto`. +* `font` - overall font. Defaults to `Roboto`. +* `color_bg` - main background color. Defaults to `#222222`. +* `color_button_bg_idle` - button background color (in idle state). Defaults to `#888888`. +* `color_button_bg_hover` - button background color (in hover state). Defaults to `#aaaaaa`. +* `color_button_bg_selected` - selected button background color (in idle state). Defaults to `#dddddd`. +* `color_button_bg_selected_hover` - selected button background color (in hover state). Defaults to `#cccccc`. +* `color_button_text` - button text color (in any state). Defaults to `#1f1f1f`. +* `color_text` - main text and foreground elements color (such as progress bar and power icons). Defaults to `#dddddd`. +* `color_placeholder_text` - placeholder text color (in password field). Defaults to `#888888`. ## License diff --git a/slice/LoopListPowerItem.qml b/slice/LoopListPowerItem.qml index bd9aa8b..3cf62ed 100644 --- a/slice/LoopListPowerItem.qml +++ b/slice/LoopListPowerItem.qml @@ -42,14 +42,14 @@ Item id: powerItemIconOverlay anchors.fill: powerItemIcon source: powerItemIcon - color: "#dddddd" + color: config.color_text } Label { id: descriptionLabel text: itemRoot.title - color: "#fff" + color: config.color_text font { diff --git a/slice/LoopListSessionItem.qml b/slice/LoopListSessionItem.qml index fbbf245..22e01c0 100644 --- a/slice/LoopListSessionItem.qml +++ b/slice/LoopListSessionItem.qml @@ -17,7 +17,7 @@ Item id: sessionNameLabel anchors.centerIn: parent text: sessionName - color: "#fff" + color: config.color_text font { diff --git a/slice/LoopListUserItem.qml b/slice/LoopListUserItem.qml index b1e9415..6aa0490 100644 --- a/slice/LoopListUserItem.qml +++ b/slice/LoopListUserItem.qml @@ -28,18 +28,10 @@ Item sourceSize.height: 64 } - ColorOverlay - { - id: profilePictureOverlay - anchors.fill: profilePicture - source: profilePicture - color: "#dddddd" - } - Label { text: userName - color: "#fff" + color: config.color_text font { @@ -55,7 +47,7 @@ Item Label { text: userLogin - color: "#fff" + color: config.color_text y: userName == "" ? 5 : 36 font { diff --git a/slice/Main.qml b/slice/Main.qml index 8c9b600..3c21886 100644 --- a/slice/Main.qml +++ b/slice/Main.qml @@ -7,7 +7,7 @@ import QtQuick.Controls 1.4 Rectangle { id: root - color: "#222222" + color: config.color_bg state: "stateUsers" states: diff --git a/slice/PageUsers.qml b/slice/PageUsers.qml index 8c4c35f..8bd790f 100644 --- a/slice/PageUsers.qml +++ b/slice/PageUsers.qml @@ -229,8 +229,8 @@ Item style: TextFieldStyle { - textColor: "#dddddd" - placeholderTextColor: "#888888" + textColor: config.color_text + placeholderTextColor: config.color_placeholder_text background: Item { height: 25 } } @@ -252,6 +252,7 @@ Item width: parent.width height: 2 opacity: hasLoginShown ? 1 : 0 + color: config.color_text } Rectangle @@ -262,6 +263,7 @@ Item width: parent.width / 5 height: 2 opacity: 0 + color: config.color_text } Rectangle @@ -272,6 +274,7 @@ Item width: 0 height: 2 opacity: 0 + color: config.color_text } SlicedButton @@ -309,7 +312,7 @@ Item y: pageRoot.height / 4.7 opacity: 0 - color: "#fff" + color: config.color_text font { diff --git a/slice/SlicedButton.qml b/slice/SlicedButton.qml index 4ae1c3b..99ddd1d 100644 --- a/slice/SlicedButton.qml +++ b/slice/SlicedButton.qml @@ -50,19 +50,19 @@ Item PropertyChanges { target: buttonBgSliceLeft; - bgColor: selected ? "#dddddd" : "#888888" + bgColor: selected ? config.color_button_bg_selected : config.color_button_bg_idle } PropertyChanges { target: buttonBgCenter; - color: selected ? "#dddddd" : "#888888" + color: selected ? config.color_button_bg_selected : config.color_button_bg_idle } PropertyChanges { target: buttonBgSliceRight; - bgColor: selected ? "#dddddd" : "#888888" + bgColor: selected ? config.color_button_bg_selected : config.color_button_bg_idle } }, State @@ -71,19 +71,19 @@ Item PropertyChanges { target: buttonBgSliceLeft; - bgColor: selected ? "#cccccc" : "#aaaaaa" + bgColor: selected ? config.color_button_bg_selected_hover : config.color_button_bg_hover } PropertyChanges { target: buttonBgCenter; - color: selected ? "#cccccc" : "#aaaaaa" + color: selected ? config.color_button_bg_selected_hover : config.color_button_bg_hover } PropertyChanges { target: buttonBgSliceRight; - bgColor: selected ? "#cccccc" : "#aaaaaa" + bgColor: selected ? config.color_button_bg_selected_hover : config.color_button_bg_hover } } ] @@ -94,7 +94,7 @@ Item width: paddingLeft height: parent.height - property string bgColor: "#888888" + property string bgColor: config.color_button_bg_idle onPaint: { @@ -130,7 +130,7 @@ Item Rectangle { id: buttonBgCenter - color: "#888888" + color: config.color_button_bg_idle x: paddingLeft width: buttonText.width height: parent.height @@ -162,7 +162,7 @@ Item width: paddingRight height: parent.height - property string bgColor: "#888888" + property string bgColor: config.color_button_bg_idle onPaint: { @@ -196,7 +196,7 @@ Item id: buttonText x: paddingLeft y: paddingTop - color: "#1f1f1f" + color: config.color_button_text font { diff --git a/slice/theme.conf b/slice/theme.conf index 88e1d2c..1a0e6ec 100644 --- a/slice/theme.conf +++ b/slice/theme.conf @@ -1,2 +1,10 @@ [General] font=Roboto +color_bg=#222222 +color_button_bg_idle=#888888 +color_button_bg_hover=#aaaaaa +color_button_bg_selected=#dddddd +color_button_bg_selected_hover=#cccccc +color_button_text=#1f1f1f +color_text=#dddddd +color_placeholder_text=#888888 \ No newline at end of file