summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2021-09-12 20:14:06 +0200
committerTimotej Lazar <timotej.lazar@araneo.si>2021-09-16 20:34:06 +0200
commit65daa139a4ac2104bae26b40aea38a0564357a66 (patch)
tree16e6ac73888703854f1d7e9512d962f454eda9c4
parent0bced7522b17679438eb862aed6825134c9959ea (diff)
Sidebar: add shortcuts for filter / events controls
-rw-r--r--Sidebar.qml30
1 files changed, 28 insertions, 2 deletions
diff --git a/Sidebar.qml b/Sidebar.qml
index 5dc04d3..13af9e0 100644
--- a/Sidebar.qml
+++ b/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
}
}