Fix UI parts focus keybind and buttons
This commit is contained in:
parent
d444c800b9
commit
45048e625c
|
@ -26,7 +26,7 @@ Rectangle {
|
||||||
icon.name: "go-back-to-main-pane"
|
icon.name: "go-back-to-main-pane"
|
||||||
toolTip.text: qsTr("Go back to main pane")
|
toolTip.text: qsTr("Go back to main pane")
|
||||||
|
|
||||||
onClicked: mainUI.mainPane.filterRoomsField.toggleFocus()
|
onClicked: mainUI.mainPane.toggleFocus()
|
||||||
|
|
||||||
Layout.preferredWidth: theme.baseElementsHeight
|
Layout.preferredWidth: theme.baseElementsHeight
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
|
@ -16,17 +16,6 @@ Rectangle {
|
||||||
readonly property alias filterField: filterField
|
readonly property alias filterField: filterField
|
||||||
|
|
||||||
|
|
||||||
function toggleFocus() {
|
|
||||||
if (filterField.activeFocus) {
|
|
||||||
pageLoader.takeFocus()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
mainPane.open()
|
|
||||||
filterField.forceActiveFocus()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
HRowLayout {
|
HRowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -67,7 +56,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
mainUI.pageLoader.forceActiveFocus()
|
mainPane.toggleFocus()
|
||||||
if (window.settings.clearRoomFilterOnEscape) text = ""
|
if (window.settings.clearRoomFilterOnEscape) text = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +70,7 @@ Rectangle {
|
||||||
|
|
||||||
HShortcut {
|
HShortcut {
|
||||||
sequences: window.settings.keys.toggleFocusMainPane
|
sequences: window.settings.keys.toggleFocusMainPane
|
||||||
onActivated: toggleFocus()
|
onActivated: mainPane.toggleFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,17 @@ HDrawer {
|
||||||
readonly property alias bottomBar: bottomBar
|
readonly property alias bottomBar: bottomBar
|
||||||
|
|
||||||
|
|
||||||
|
function toggleFocus() {
|
||||||
|
if (bottomBar.filterField.activeFocus) {
|
||||||
|
pageLoader.takeFocus()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
mainPane.open()
|
||||||
|
bottomBar.filterField.forceActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Behavior on opacity { HNumberAnimation {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
|
|
||||||
Binding on visible {
|
Binding on visible {
|
||||||
|
|
|
@ -34,7 +34,7 @@ Rectangle {
|
||||||
icon.name: "go-back-to-main-pane"
|
icon.name: "go-back-to-main-pane"
|
||||||
toolTip.text: qsTr("Go back to main pane")
|
toolTip.text: qsTr("Go back to main pane")
|
||||||
|
|
||||||
onClicked: mainUI.mainPane.filterRoomsField.toggleFocus()
|
onClicked: mainUI.mainPane.toggleFocus()
|
||||||
|
|
||||||
Layout.preferredWidth: showPaneButtons ? avatar.width : 0
|
Layout.preferredWidth: showPaneButtons ? avatar.width : 0
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
|
@ -80,6 +80,6 @@ MultiviewPane {
|
||||||
|
|
||||||
HShortcut {
|
HShortcut {
|
||||||
sequences: window.settings.keys.toggleFocusRoomPane
|
sequences: window.settings.keys.toggleFocusRoomPane
|
||||||
onActivated: toggleFocus()
|
onActivated: roomPane.toggleFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user