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 # TODO
- global presence control - global presence control
- power level control keyboard focus
- idlemanager: what if setPresence call fails due to network? - idlemanager: what if setPresence call fails due to network?
- fix power level control button layout when apply button is loading - fix power level control button layout when apply button is loading

View File

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

View File

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

View File

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