make literally every color configurable
This commit is contained in:
parent
5ecb445445
commit
631d1482f9
7 changed files with 78 additions and 77 deletions
|
@ -8,14 +8,14 @@ Column {
|
|||
id: dateLabel
|
||||
|
||||
anchors.right: parent.right
|
||||
opacity: config.DateOpacity
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.DateSize
|
||||
font.bold: config.DateBold == "true" ? true : false
|
||||
opacity: config.DateOpacity
|
||||
color: config.AccentText
|
||||
|
||||
font.bold: config.DateIsBold == "true" ? true : false
|
||||
color: config.DateColor
|
||||
|
||||
function updateDate() {
|
||||
text = new Date().toLocaleDateString(Qt.locale(), config.DateFormat)
|
||||
}
|
||||
|
@ -25,13 +25,13 @@ Column {
|
|||
id: timeLabel
|
||||
|
||||
anchors.right: parent.right
|
||||
opacity: config.TimeOpacity
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.TimeSize
|
||||
font.bold: config.TimeBold == "true" ? true : false
|
||||
opacity: config.TimeOpacity
|
||||
color: config.AccentText
|
||||
font.bold: config.TimeIsBold == "true" ? true : false
|
||||
color: config.TimeColor
|
||||
|
||||
function updateTime() {
|
||||
text = new Date().toLocaleTimeString(Qt.locale(), config.TimeFormat)
|
||||
|
|
|
@ -55,20 +55,20 @@ Item {
|
|||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.pointSize: config.GeneralFontSize
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: config.AccentText
|
||||
opacity: 0.5
|
||||
|
||||
color: config.LoginButtonTextColor
|
||||
opacity: 0.5
|
||||
text: "Login!!"
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: buttonBackground
|
||||
|
||||
color: config.AccentLight
|
||||
color: config.LoginButtonBgColor
|
||||
opacity: 0.5
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ Item {
|
|||
|
||||
radius: parent.width / 2
|
||||
anchors.centerIn: loginButton
|
||||
|
||||
color: "black"
|
||||
opacity: 1
|
||||
|
||||
|
@ -100,7 +99,7 @@ Item {
|
|||
when: loginButton.down
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: Qt.darker(config.AccentLight, 1.2)
|
||||
color: Qt.darker(config.LoginButtonBgColor, 1.4)
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
|
@ -113,7 +112,7 @@ Item {
|
|||
when: loginButton.hovered
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: Qt.lighter(config.AccentLight, 1.2)
|
||||
color: Qt.darker(config.LoginButtonBgColor, 1.2)
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
|
@ -126,7 +125,6 @@ Item {
|
|||
when: loginButton.enabled
|
||||
PropertyChanges {
|
||||
target: buttonBackground
|
||||
color: config.AccentLight
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
|
@ -143,12 +141,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
sddm.login(user, password, session)
|
||||
print("user: " + user)
|
||||
print("password: " + password)
|
||||
print("session: " + session)
|
||||
}
|
||||
onClicked: sddm.login(user, password, session)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,25 +6,23 @@ TextField {
|
|||
|
||||
focus: true
|
||||
selectByMouse: true
|
||||
|
||||
placeholderText: "Password"
|
||||
echoMode: TextInput.Password
|
||||
passwordCharacter: "•"
|
||||
passwordMaskDelay: 1000
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.pointSize: config.GeneralFontSize
|
||||
font.bold: true
|
||||
color: config.AccentText
|
||||
color: config.TextFieldTextColor
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
|
||||
placeholderText: "Password"
|
||||
|
||||
|
||||
background: Rectangle {
|
||||
id: passFieldBg
|
||||
|
||||
color: config.AccentDark
|
||||
border.color: config.AccentText
|
||||
color: config.TextFieldColor
|
||||
border.color: config.TextFieldTextColor
|
||||
border.width: 0
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
@ -35,7 +33,7 @@ TextField {
|
|||
when: passwordField.activeFocus
|
||||
PropertyChanges {
|
||||
target: passFieldBg
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
color: Qt.darker(config.TextFieldColor, 1.2)
|
||||
border.width: 3
|
||||
}
|
||||
},
|
||||
|
@ -44,7 +42,7 @@ TextField {
|
|||
when: passwordField.hovered
|
||||
PropertyChanges {
|
||||
target: passFieldBg
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
color: Qt.darker(config.TextFieldColor, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -22,18 +22,18 @@ Item {
|
|||
contentItem: Text {
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.pointSize: config.GeneralFontSize
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: config.AccentText
|
||||
color: highlighted ? config.PopupBgColor : config.PopupHighlightColor
|
||||
text: name
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: sessionEntryBg
|
||||
|
||||
color: highlighted ? config.AccentLight : Qt.darker(config.AccentText, 1.3)
|
||||
color: highlighted ? config.PopupHighlightColor : config.PopupBgColor
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ Item {
|
|||
when: sessionEntry.hovered
|
||||
PropertyChanges {
|
||||
target: sessionEntryBg
|
||||
color: highlighted ? Qt.lighter(config.AccentLight, 1.2) : Qt.darker(config.AccentText, 1.5)
|
||||
color: highlighted ? Qt.darker(config.PopupHighlightColor, 1.2) : Qt.darker(config.PopupBgColor, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -75,12 +75,12 @@ Item {
|
|||
icon.source: Qt.resolvedUrl("../icons/session_menu.png")
|
||||
icon.height: height * 0.5
|
||||
icon.width: width * 0.5
|
||||
icon.color: config.AccentText
|
||||
icon.color: config.SessionIconColor
|
||||
|
||||
background: Rectangle {
|
||||
id: sessionButtonBg
|
||||
|
||||
color: config.AccentLight
|
||||
color: config.SessionButtonColor
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ Item {
|
|||
when: sessionButton.down
|
||||
PropertyChanges {
|
||||
target: sessionButtonBg
|
||||
color: Qt.darker(config.AccentLight, 1.2)
|
||||
color: Qt.darker(config.SessionButtonColor, 1.2)
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -98,7 +98,7 @@ Item {
|
|||
when: sessionButton.hovered
|
||||
PropertyChanges {
|
||||
target: sessionButtonBg
|
||||
color: sessionPopup.visible ? Qt.darker(config.AccentLight, 1.2) : Qt.lighter(config.AccentLight, 1.2)
|
||||
color: Qt.darker(config.SessionButtonColor, 1.2)
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@ -106,7 +106,7 @@ Item {
|
|||
when: sessionPopup.visible
|
||||
PropertyChanges {
|
||||
target: sessionButtonBg
|
||||
color: Qt.darker(config.AccentLight, 1.2)
|
||||
color: Qt.darker(config.SessionButtonColor, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -135,7 +135,7 @@ Item {
|
|||
|
||||
background: Rectangle {
|
||||
radius: config.CornerRadius * 1.8
|
||||
color: config.AccentText
|
||||
color: config.PopupBgColor
|
||||
}
|
||||
|
||||
contentItem: ListView {
|
||||
|
@ -143,9 +143,7 @@ Item {
|
|||
|
||||
implicitHeight: contentHeight
|
||||
spacing: 8
|
||||
|
||||
model: sessionWrapper
|
||||
|
||||
currentIndex: sessionModel.lastIndex
|
||||
clip: true
|
||||
}
|
||||
|
|
|
@ -7,25 +7,24 @@ TextField {
|
|||
|
||||
height: inputHeight
|
||||
width: inputWidth
|
||||
|
||||
selectByMouse: true
|
||||
echoMode: TextInput.Normal
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.pointSize: config.GeneralFontSize
|
||||
font.bold: true
|
||||
color: config.AccentText
|
||||
color: config.TextFieldTextColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
placeholderText: "Username"
|
||||
placeholderText: "User"
|
||||
text: userModel.lastUser
|
||||
|
||||
background: Rectangle {
|
||||
id: userFieldBackground
|
||||
|
||||
color: config.AccentDark
|
||||
border.color: config.AccentText
|
||||
color: config.TextFieldColor
|
||||
border.color: config.TextFieldTextColor
|
||||
border.width: 0
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
@ -36,7 +35,7 @@ TextField {
|
|||
when: usernameField.activeFocus
|
||||
PropertyChanges {
|
||||
target: userFieldBackground
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
color: Qt.darker(config.TextFieldColor, 1.2)
|
||||
border.width: 3
|
||||
}
|
||||
},
|
||||
|
@ -45,7 +44,7 @@ TextField {
|
|||
when: usernameField.hovered
|
||||
PropertyChanges {
|
||||
target: userFieldBackground
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
color: Qt.darker(config.TextFieldColor, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -22,19 +22,18 @@ Column {
|
|||
contentItem: Text {
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.pointSize: config.GeneralFontSize
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: config.AccentText
|
||||
|
||||
color: highlighted ? config.PopupBgColor : config.PopupHighlightColor
|
||||
text: name
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: userEntryBg
|
||||
|
||||
color: highlighted ? config.AccentLight : Qt.darker(config.AccentText, 1.3)
|
||||
color: highlighted ? config.PopupHighlightColor : config.PopupBgColor
|
||||
radius: config.CornerRadius
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,7 @@ Column {
|
|||
when: userEntry.hovered
|
||||
PropertyChanges {
|
||||
target: userEntryBg
|
||||
color: highlighted ? Qt.lighter(config.AccentLight, 1.2) : Qt.darker(config.AccentText, 1.5)
|
||||
color: highlighted ? Qt.darker(config.PopupHighlightColor, 1.2) : Qt.darker(config.PopupBgColor, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -75,23 +74,21 @@ Column {
|
|||
y: (inputWidth / 3) - padding - (userList.implicitHeight / 2)
|
||||
padding: 15
|
||||
|
||||
background: Rectangle {
|
||||
radius: config.CornerRadius * 1.8
|
||||
color: config.PopupBgColor
|
||||
}
|
||||
|
||||
contentItem: ListView {
|
||||
id: userList
|
||||
|
||||
implicitHeight: contentHeight
|
||||
spacing: 8
|
||||
|
||||
model: userWrapper
|
||||
|
||||
currentIndex: userModel.lastIndex
|
||||
clip: true
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: config.CornerRadius * 1.8
|
||||
color: config.AccentText
|
||||
}
|
||||
|
||||
enter: Transition {
|
||||
NumberAnimation {
|
||||
properties: "opacity"
|
||||
|
@ -124,9 +121,9 @@ Column {
|
|||
height: inputWidth / 1.5 + (border.width * 2)
|
||||
width: inputWidth / 1.5 + (border.width * 2)
|
||||
radius: height / 2
|
||||
border.width: config.LoginUserPictureBorderWidth
|
||||
border.color: config.AccentText
|
||||
color: config.AccentLight
|
||||
border.width: config.UserPictureBorderWidth
|
||||
border.color: config.UserPictureBorderColor
|
||||
color: config.UserPictureColor
|
||||
|
||||
MouseArea {
|
||||
id: roundMouseArea
|
||||
|
@ -158,24 +155,24 @@ Column {
|
|||
name: "pressed"
|
||||
PropertyChanges {
|
||||
target: pictureBorder
|
||||
border.color: Qt.darker(config.AccentText, 1.5)
|
||||
color: Qt.darker(config.AccentLight, 1.5)
|
||||
border.color: Qt.darker(config.UserPictureBorderColor, 1.2)
|
||||
color: Qt.darker(config.UserPictureColor, 1.2)
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hovered"
|
||||
PropertyChanges {
|
||||
target: pictureBorder
|
||||
border.color: Qt.darker(config.AccentText, 1.2)
|
||||
color: Qt.darker(config.AccentLight, 1.2)
|
||||
border.color: Qt.darker(config.UserPictureBorderColor, 1.2)
|
||||
color: Qt.darker(config.UserPictureColor, 1.2)
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "unhovered"
|
||||
PropertyChanges {
|
||||
target: pictureBorder
|
||||
border.color: config.AccentText
|
||||
color: config.AccentLight
|
||||
border.color: config.UserPictureBorderColor
|
||||
color: config.UserPictureColor
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
26
theme.conf
26
theme.conf
|
@ -8,17 +8,33 @@ Background="backgrounds/glacier.png"
|
|||
Font="Atkinson Hyperlegible"
|
||||
Padding="50"
|
||||
CornerRadius="5"
|
||||
|
||||
LoginFontSize="9"
|
||||
GeneralFontSize="9"
|
||||
LoginScale="0.175"
|
||||
LoginUserPictureBorderWidth="5"
|
||||
|
||||
UserPictureBorderWidth="5"
|
||||
UserPictureBorderColor="#c0caf5"
|
||||
UserPictureColor="#414868"
|
||||
|
||||
TextFieldColor="#414868"
|
||||
TextFieldTextColor="#c0caf5"
|
||||
|
||||
LoginButtonTextColor="#414868"
|
||||
LoginButtonBgColor="#c0caf5"
|
||||
|
||||
PopupBgColor="#414868"
|
||||
PopupHighlightColor="#c0caf5"
|
||||
|
||||
SessionButtonColor="#c0caf5"
|
||||
SessionIconColor="#414868"
|
||||
|
||||
DateColor="#c0caf5"
|
||||
DateSize="36"
|
||||
DateBold="false"
|
||||
DateIsBold="false"
|
||||
DateOpacity="0.8"
|
||||
DateFormat="dddd, MMMM d"
|
||||
|
||||
TimeColor="#c0caf5"
|
||||
TimeSize="48"
|
||||
TimeBold="true"
|
||||
TimeIsBold="true"
|
||||
TimeOpacity="0.8"
|
||||
TimeFormat="hh:mm AP"
|
||||
|
|
Loading…
Add table
Reference in a new issue