Enter member profile → focus power level control

This commit is contained in:
miruka 2020-07-16 18:17:44 -04:00
parent bcf93a6f36
commit 42791f32d3
4 changed files with 4 additions and 7 deletions

View File

@ -1,7 +1,6 @@
# TODO
- global presence control
- power level control keyboard focus
- idlemanager: what if setPresence call fails due to network?
- fix power level control button layout when apply button is loading

View File

@ -24,6 +24,7 @@ AutoDirectionLayout {
rowSpacing: theme.spacing
onActiveFocusChanged: if (activeFocus) field.forceActiveFocus()
HSpacer {}

View File

@ -208,9 +208,12 @@ HListView {
defaultLevel: member.power_level
maximumLevel: root.ownPowerLevel
rowSpacing: powerLevel.spacing
onAccepted: applyButton.clicked()
onFieldFocusedChanged:
root.powerLevelFieldFocused = fieldFocused
Component.onCompleted: forceActiveFocus()
}
}

View File

@ -96,12 +96,6 @@ HColumnLayout {
onActiveFocusChanged: {
if (
activeFocus &&
stackView.depth === 1 &&
stackView.currentItem.currentIndex === -1
) {
stackView.currentItem.currentIndex = 0
} else if (
! activeFocus &&
stackView.depth === 1 &&
stackView.currentItem.currentIndex === 0