added (configurable) auto-focus of input fields; see also 3ximus/aerial-sddm-theme#13
This commit is contained in:
parent
c1ea4d7bd0
commit
889886a70b
20
Main.qml
20
Main.qml
@ -67,7 +67,15 @@ Rectangle {
|
||||
id: mouseArea1
|
||||
anchors.fill: parent;
|
||||
//onPressed: {playlist1.shuffle(); playlist1.next();}
|
||||
onPressed: { fader1.state = fader1.state == "off" ? "on" : "off" ; }
|
||||
onPressed: {
|
||||
fader1.state = fader1.state == "off" ? "on" : "off" ;
|
||||
if (config.autofocusInput == "true") {
|
||||
if (username_input_box.text == "")
|
||||
username_input_box.focus = true
|
||||
else
|
||||
password_input_box.focus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Keys.onPressed: {
|
||||
fader1.state = "on";
|
||||
@ -106,7 +114,15 @@ Rectangle {
|
||||
id: mouseArea2
|
||||
enabled: false
|
||||
anchors.fill: parent;
|
||||
onPressed: { fader2.state = fader2.state == "off" ? "on" : "off" ; }
|
||||
onPressed: {
|
||||
fader1.state = fader1.state == "off" ? "on" : "off" ;
|
||||
if (config.autofocusInput == "true") {
|
||||
if (username_input_box.text == "")
|
||||
username_input_box.focus = true
|
||||
else
|
||||
password_input_box.focus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
enabled: true
|
||||
|
@ -9,3 +9,4 @@ usernameLeftMargin=15
|
||||
relativePositionX=0.3
|
||||
relativePositionY=0.7
|
||||
showTopBar=true
|
||||
autofocusInput=true
|
||||
|
@ -9,3 +9,4 @@ showLoginButton=false
|
||||
type=color
|
||||
usernameLeftMargin=15
|
||||
showTopBar=true
|
||||
autofocusInput=true
|
||||
|
Loading…
Reference in New Issue
Block a user