Sidebar: add shortcuts for filter / events controls
This commit is contained in:
parent
0bced7522b
commit
65daa139a4
1 changed files with 28 additions and 2 deletions
30
Sidebar.qml
30
Sidebar.qml
|
@ -133,6 +133,19 @@ Page {
|
|||
placeholderText: qsTr('Filter')
|
||||
onTextChanged: eventFilter.setFilter(text)
|
||||
Keys.onEscapePressed: text = ''
|
||||
|
||||
Shortcut {
|
||||
id: shortcutFilter
|
||||
sequence: 'Ctrl+F'
|
||||
onActivated: filter.forceActiveFocus()
|
||||
}
|
||||
Label {
|
||||
anchors { right: parent.right; bottom: parent.bottom; margins: 4 }
|
||||
visible: !parent.activeFocus
|
||||
text: shortcutFilter.nativeText
|
||||
font.pixelSize: filter.font.pixelSize * 0.75
|
||||
color: 'gray'
|
||||
}
|
||||
}
|
||||
|
||||
Events {
|
||||
|
@ -153,16 +166,29 @@ Page {
|
|||
}
|
||||
Keys.forwardTo: control
|
||||
|
||||
Shortcut {
|
||||
id: shortcutEvents
|
||||
sequence: 'Ctrl+E'
|
||||
onActivated: events.forceActiveFocus()
|
||||
}
|
||||
Label {
|
||||
anchors { right: parent.right; bottom: parent.bottom; margins: 4 }
|
||||
visible: !parent.activeFocus
|
||||
text: shortcutEvents.nativeText
|
||||
font.pixelSize: filter.font.pixelSize * 0.75
|
||||
color: 'gray'
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors { left: parent.left; right: parent.right; top: parent.top }
|
||||
implicitHeight: 1
|
||||
color: palette.mid
|
||||
color: parent.activeFocus ? palette.highlight : palette.dark
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||
implicitHeight: 1
|
||||
color: palette.mid
|
||||
color: parent.activeFocus ? palette.highlight : palette.dark
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue