diff --git a/Main.qml b/Main.qml index 281df71..80a5e33 100644 --- a/Main.qml +++ b/Main.qml @@ -285,6 +285,7 @@ Rectangle { onClicked: { root.state = "stateSession" sessionFrame.focus = true + sessionFrame.currentItem.forceActiveFocus() } onEnterPressed: sessionFrame.currentItem.forceActiveFocus() @@ -311,6 +312,7 @@ Rectangle { onClicked: { root.state = "stateUser" userFrame.focus = true + userFrame.currentItem.forceActiveFocus() } onEnterPressed: userFrame.currentItem.forceActiveFocus() KeyNavigation.backtab: shutdownButton @@ -336,6 +338,7 @@ Rectangle { onClicked: { root.state = "statePower" powerFrame.focus = true + powerFrame.currentItem.forceActiveFocus() } onEnterPressed: powerFrame.shutdown.focus = true KeyNavigation.backtab: loginFrame.button diff --git a/PowerFrame.qml b/PowerFrame.qml index e2d85e4..594ad4d 100644 --- a/PowerFrame.qml +++ b/PowerFrame.qml @@ -8,6 +8,7 @@ Item { signal needSuspend() property alias shutdown: shutdownButton + property alias currentItem: shutdownButton Row { spacing: 70 diff --git a/UserFrame.qml b/UserFrame.qml index c73863e..6ef7f81 100644 --- a/UserFrame.qml +++ b/UserFrame.qml @@ -73,25 +73,31 @@ Item { UserAvatar { id: iconButton - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter width: 100 height: 100 source: icon onClicked: item.select() + anchors { + top: parent.top + topMargin: 10 + horizontalCenter: parent.horizontalCenter + } } Text { id: nameText - width: parent.width - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - 10 horizontalAlignment: Text.AlignHCenter text: name font.family: config.font font.pointSize: 15 color: "white" - wrapMode: Text.WordWrap + elide: Text.ElideRight + anchors { + bottom: parent.bottom + horizontalCenter: parent.horizontalCenter + bottomMargin: 10 + } } Keys.onLeftPressed: {