Skip to content
Permalink
Browse files

Moved style definitions to a singleton

  • Loading branch information
martonborzak committed Jan 1, 2020
1 parent 2ed4012 commit bf3acaa8d9ef6b4bf98069128fea3517592e11ea
Showing with 577 additions and 587 deletions.
  1. +10 βˆ’9 basic_ui/ChargingScreen.qml
  2. +5 βˆ’5 basic_ui/ContextMenu.qml
  3. +2 βˆ’2 basic_ui/ContextMenuIcon.qml
  4. +6 βˆ’5 basic_ui/CustomButton.qml
  5. +5 βˆ’5 basic_ui/CustomButtonState.qml
  6. +6 βˆ’5 basic_ui/CustomSwitch.qml
  7. +5 βˆ’4 basic_ui/MainNavigation.qml
  8. +14 βˆ’14 basic_ui/MiniMediaPlayer.qml
  9. +8 βˆ’8 basic_ui/Notification.qml
  10. +1 βˆ’1 basic_ui/NotificationDrawer.qml
  11. +10 βˆ’8 basic_ui/PopupLowBattery.qml
  12. +8 βˆ’8 basic_ui/Profiles.qml
  13. +2 βˆ’2 basic_ui/ProgressCircle.qml
  14. +3 βˆ’2 basic_ui/Settings.qml
  15. +11 βˆ’10 basic_ui/StatusBar.qml
  16. +3 βˆ’3 basic_ui/Tag.qml
  17. +4 βˆ’2 basic_ui/Volume.qml
  18. +2 βˆ’1 basic_ui/pages/Favorites.qml
  19. +2 βˆ’1 basic_ui/pages/Group.qml
  20. +6 βˆ’5 basic_ui/pages/Page.qml
  21. +21 βˆ’21 basic_ui/settings/Battery.qml
  22. +6 βˆ’5 basic_ui/settings/Bluetooth.qml
  23. +3 βˆ’3 basic_ui/settings/Devices.qml
  24. +22 βˆ’21 basic_ui/settings/Display.qml
  25. +15 βˆ’15 basic_ui/settings/Integrations.qml
  26. +7 βˆ’7 basic_ui/settings/Languages.qml
  27. +18 βˆ’17 basic_ui/settings/Network.qml
  28. +23 βˆ’22 basic_ui/settings/PowerSaving.qml
  29. +6 βˆ’6 basic_ui/settings/RemoteConfig.qml
  30. +10 βˆ’9 basic_ui/settings/Softwareupdate.qml
  31. +10 βˆ’10 basic_ui/settings/System.qml
  32. +4 βˆ’4 basic_ui/settings/WifiNetworkListElement.qml
  33. +15 βˆ’14 components/ButtonBase.qml
  34. +13 βˆ’13 components/blind/ui/Button.qml
  35. +12 βˆ’12 components/blind/ui/Card.qml
  36. +1 βˆ’1 components/climate/ui/Button.qml
  37. +16 βˆ’16 components/climate/ui/Card.qml
  38. +5 βˆ’5 components/climate/ui/ContextMenu.qml
  39. +14 βˆ’13 components/light/ui/Button.qml
  40. +25 βˆ’25 components/light/ui/CardColor.qml
  41. +13 βˆ’13 components/light/ui/CardDimmable.qml
  42. +10 βˆ’10 components/light/ui/CardSwitch.qml
  43. +6 βˆ’6 components/media_player/ui/AlbumView.qml
  44. +2 βˆ’2 components/media_player/ui/Button.qml
  45. +5 βˆ’5 components/media_player/ui/Card.qml
  46. +10 βˆ’10 components/media_player/ui/CardHome.qml
  47. +5 βˆ’5 components/media_player/ui/CardPlaylists.qml
  48. +18 βˆ’18 components/media_player/ui/CardSearch.qml
  49. +3 βˆ’3 components/remote/ui/ir/Button.qml
  50. +10 βˆ’10 components/remote/ui/ir/Card.qml
  51. +2 βˆ’2 components/remote/ui/ir/CardButtons.qml
  52. +4 βˆ’4 components/remote/ui/ir/CardChannels.qml
  53. +14 βˆ’14 components/weather/ui/Button.qml
  54. +13 βˆ’13 components/weather/ui/Card.qml
  55. +7 βˆ’30 main.qml
  56. +1 βˆ’0 qml.qrc
  57. +0 βˆ’1 remote.pro
  58. +12 βˆ’13 sources/main.cpp
  59. +0 βˆ’1 style.qml
  60. +0 βˆ’5 style.qrc
  61. +72 βˆ’72 translations/en_US.ts
  62. +11 βˆ’11 wifiSetup.qml
@@ -22,13 +22,14 @@

import QtQuick 2.11
import QtGraphicalEffects 1.0
import Style 1.0
import "qrc:/scripts/helper.js" as JSHelper

Rectangle {
id: chargingScreen
width: parent.width
height: parent.height
color: colorBackground
color: Style.colorBackground

state: "hidden"

@@ -103,7 +104,7 @@ Rectangle {
color: "#00000000"
radius: 16
border.width: 6
border.color: colorLine
border.color: Style.colorLine
}

// battery frame
@@ -113,9 +114,9 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
width: 151
height: 218
color: colorBackground
color: Style.colorBackground
border.width: 6
border.color: colorLine
border.color: Style.colorLine
radius: 32

// battery fill
@@ -125,7 +126,7 @@ Rectangle {
anchors.bottomMargin: 23
width: 106
height: battery_level*172
color: colorGreen
color: Style.colorGreen
radius: 8
}

@@ -140,18 +141,18 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter

ColorOverlay {
visible: !darkMode
visible: !Style.darkMode
anchors.fill: parent
source: parent
color: colorText
color: Style.colorText
}
}
}
}

Text {
id: chargeText
color: colorText
color: Style.colorText
text: Math.round(battery_level * 100) + qsTr("% Charged") + translateHandler.emptyString
anchors.bottom: parent.bottom
anchors.bottomMargin: 230
@@ -166,7 +167,7 @@ Rectangle {

Text {
id: timeText
color: colorText
color: Style.colorText
text: loader_main.item ? loader_main.item.statusBar.timeText.text : ""
verticalAlignment: Text.AlignVCenter
anchors.horizontalCenter: parent.horizontalCenter
@@ -26,8 +26,8 @@ Rectangle {
id: main
width: parent.width
height: 100+(80*list.length)
radius: cornerRadius
color: colorBackground
radius: Style.cornerRadius
color: Style.colorBackground

property var list: []
property string id
@@ -82,7 +82,7 @@ Rectangle {

Text {
id: icon
color: colorText
color: Style.colorText
text: {
if (list[index] == "PLAY")
return "\uE903"
@@ -115,7 +115,7 @@ Rectangle {
else
return "Not supported"
}
color: colorText
color: Style.colorText
anchors.left: icon.right
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
@@ -149,7 +149,7 @@ Rectangle {

Text {
text: qsTr("Cancel") + translateHandler.emptyString
color: colorText
color: Style.colorText
opacity: 0.5
anchors.centerIn: parent
font.family: "Open Sans"
@@ -26,10 +26,10 @@ Rectangle {
id: circleButton
width: 30
height: 30
color: colorLine
color: Style.colorLine
radius: width/2

property var colorBg: colorBackground
property var colorBg: Style.colorBackground
property alias mouseArea: mouseArea


@@ -22,6 +22,7 @@

import QtQuick 2.11
import QtQuick.Controls 2.5
import Style 1.0

Rectangle {

@@ -32,17 +33,17 @@ Rectangle {
id: button
width: buttonText.implicitWidth+60
height: 60
color: colorBackgroundTransparent
color: Style.colorBackgroundTransparent
radius: 40
border.color: colorLine
border.color: Style.colorLine

states: State {
name: "pressed"
when: mouseArea.pressed == true
PropertyChanges {
target: button
color: colorLine
border.color: colorBackgroundTransparent
color: Style.colorLine
border.color: Style.colorBackgroundTransparent
}
}

@@ -55,7 +56,7 @@ Rectangle {

Text {
id: buttonText
color: colorText
color: Style.colorText
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
@@ -31,17 +31,17 @@ Rectangle {
id: button
width: buttonText.implicitWidth+60
height: 60
color: buttonState ? colorHighlight1 : colorBackgroundTransparent
color: buttonState ? Style.colorHighlight1 : Style.colorBackgroundTransparent
radius: 40
border.color: buttonState ? colorHighlight1 : colorLine
border.color: buttonState ? Style.colorHighlight1 : Style.colorLine

states: State {
name: "pressed"
when: mouseArea.pressed === true
PropertyChanges {
target: button
color: buttonState ? colorBackgroundTransparent : colorHighlight1
border.color: buttonState ? colorLine : colorBackgroundTransparent
color: buttonState ? Style.colorBackgroundTransparent : Style.colorHighlight1
border.color: buttonState ? Style.colorLine : Style.colorBackgroundTransparent
}
}

@@ -54,7 +54,7 @@ Rectangle {

Text {
id: buttonText
color: colorText
color: Style.colorText
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
@@ -22,6 +22,7 @@

import QtQuick 2.11
import QtQuick.Controls 2.5
import Style 1.0

Item {
width: 66
@@ -42,8 +43,8 @@ Item {
y: (button.height - height) / 2
width: 26
height: 26
radius: cornerRadius
color: button.checked ? colorText : colorLight
radius: Style.cornerRadius
color: button.checked ? Style.colorText : Style.colorLight

Behavior on x {
enabled: !button.pressed
@@ -52,10 +53,10 @@ Item {
}

background: Rectangle {
radius: cornerRadius+2
color: button.checked ? colorHighlight1 : colorDark
radius: Style.cornerRadius+2
color: button.checked ? Style.colorHighlight1 : Style.colorDark
border.width: 2
border.color: button.checked ? colorHighlight1 : colorLight
border.color: button.checked ? Style.colorHighlight1 : Style.colorLight
}
}

@@ -23,6 +23,7 @@
import QtQuick 2.11
import QtGraphicalEffects 1.0
import QtQml.Models 2.3
import Style 1.0

import "qrc:/scripts/helper.js" as JSHelper

@@ -33,7 +34,7 @@ Item {

Rectangle {
anchors.fill: parent
color: colorBackground
color: Style.colorBackground
}

MouseArea {
@@ -205,7 +206,7 @@ Item {

width: buttonText.implicitWidth+30
height: 50
color: colorBackgroundTransparent
color: Style.colorBackgroundTransparent
opacity: selected ? 1 : 0.3

states: State {
@@ -225,7 +226,7 @@ Item {
Rectangle {
width: parent.width
height: parent.height
color: dragArea.held ? colorHighlight1 : ( selected ? colorHighlight2 : colorBackgroundTransparent )
color: dragArea.held ? Style.colorHighlight1 : ( selected ? Style.colorHighlight2 : Style.colorBackgroundTransparent )
radius: width / 2

Behavior on color {
@@ -234,7 +235,7 @@ Item {

Text {
id: buttonText
color: colorText
color: Style.colorText
text: qsTr(friendly_name) + translateHandler.emptyString
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter

0 comments on commit bf3acaa

Please sign in to comment.
You can’t perform that action at this time.