Workin on buttons
This commit is contained in:
@@ -212,17 +212,15 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// And this row here has our buttons
|
// This singular Row has our login button
|
||||||
Row {
|
Row {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
property int btnWidth: Math.max(loginButton.implicitWidth,
|
width: parent.width
|
||||||
shutdownButton.implicitWidth,
|
|
||||||
rebootButton.implicitWidth, 80) + 8
|
|
||||||
Button {
|
Button {
|
||||||
id: loginButton
|
id: loginButton
|
||||||
text: textConstants.login
|
text: textConstants.login
|
||||||
width: parent.btnWidth
|
width: parent.width
|
||||||
radius: 8
|
radius: 8
|
||||||
|
|
||||||
onClicked: sddm.login(name.text, password.text, sessionIndex)
|
onClicked: sddm.login(name.text, password.text, sessionIndex)
|
||||||
@@ -236,7 +234,14 @@ Rectangle {
|
|||||||
activeColor: "#83a598"
|
activeColor: "#83a598"
|
||||||
pressedColor: "#458588"
|
pressedColor: "#458588"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// And this one has our shutdown/reboot buttons
|
||||||
|
Row {
|
||||||
|
spacing: 4
|
||||||
|
width: parent.width
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
property int btnWidth: parent.width / 2 - ( spacing / 2 )
|
||||||
Button {
|
Button {
|
||||||
id: shutdownButton
|
id: shutdownButton
|
||||||
text: textConstants.shutdown
|
text: textConstants.shutdown
|
||||||
@@ -248,11 +253,11 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
|
KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
textColor: "#282828"
|
textColor: "#ebdbb2"
|
||||||
color: "#83a598"
|
color: "#32302f"
|
||||||
disabledColor: "#32302f"
|
disabledColor: "#32302f"
|
||||||
activeColor: "#83a598"
|
activeColor: "#fb4934"
|
||||||
pressedColor: "#458588"
|
pressedColor: "#cc241d"
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
@@ -266,11 +271,11 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
|
KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
|
||||||
font.family: "IBM Plex Sans"
|
font.family: "IBM Plex Sans"
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
textColor: "#282828"
|
textColor: "#ebdbb2"
|
||||||
color: "#83a598"
|
color: "#32302f"
|
||||||
disabledColor: "#32302f"
|
disabledColor: "#32302f"
|
||||||
activeColor: "#83a598"
|
activeColor: "#fb4934"
|
||||||
pressedColor: "#458588"
|
pressedColor: "#cc241d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user