Fix back/forward headers buttons in small window
This commit is contained in:
parent
05325d21bd
commit
b4561ce50b
|
@ -26,7 +26,7 @@ Rectangle {
|
|||
icon.name: "go-back-to-main-pane"
|
||||
toolTip.text: qsTr("Go back to main pane")
|
||||
|
||||
onClicked: mainUI.mainPane.toggleFocus()
|
||||
onClicked: mainUI.mainPane.filterRoomsField.toggleFocus()
|
||||
|
||||
Layout.preferredWidth: theme.baseElementsHeight
|
||||
Layout.fillHeight: true
|
||||
|
|
|
@ -33,6 +33,17 @@ HTextField {
|
|||
property RoomList roomList
|
||||
|
||||
|
||||
function toggleFocus() {
|
||||
if (filterField.activeFocus) {
|
||||
pageLoader.takeFocus()
|
||||
return
|
||||
}
|
||||
|
||||
mainPane.open()
|
||||
filterField.forceActiveFocus()
|
||||
}
|
||||
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
|
||||
HShortcut {
|
||||
|
@ -42,14 +53,6 @@ HTextField {
|
|||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.toggleFocusMainPane
|
||||
onActivated: {
|
||||
if (filterField.activeFocus) {
|
||||
pageLoader.takeFocus()
|
||||
return
|
||||
}
|
||||
|
||||
mainPane.open()
|
||||
filterField.forceActiveFocus()
|
||||
}
|
||||
onActivated: toggleFocus()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ Rectangle {
|
|||
icon.name: "go-back-to-main-pane"
|
||||
toolTip.text: qsTr("Go back to main pane")
|
||||
|
||||
onClicked: mainUI.mainPane.toggleFocus()
|
||||
onClicked: mainUI.mainPane.filterRoomsField.toggleFocus()
|
||||
|
||||
Layout.preferredWidth: showPaneButtons ? avatar.width : 0
|
||||
Layout.fillHeight: true
|
||||
|
|
Loading…
Reference in New Issue
Block a user