From 97422bb60a55017503b67d10c86b72e8591def5d Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 15 Sep 2021 22:03:11 +0200 Subject: [PATCH] Sidebar: add left border to event list --- Sidebar.qml | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/Sidebar.qml b/Sidebar.qml index 13af9e0..7b65dae 100644 --- a/Sidebar.qml +++ b/Sidebar.qml @@ -148,47 +148,47 @@ Page { } } - Events { - id: events - + Frame { Layout.fillWidth: true Layout.fillHeight: true Layout.rightMargin: -control.padding - focus: true - model: eventFilter - tags: eventList.tags - - onEditingChanged: video.pause(editing) - onSelected: { - video.pause(true) - video.seek(event.time) - } - 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' + padding: 1 + rightPadding: 0 + background: Rectangle { + color: 'transparent' + border.color: events.activeFocus ? palette.highlight : palette.dark + radius: 2 } - Rectangle { - anchors { left: parent.left; right: parent.right; top: parent.top } - implicitHeight: 1 - color: parent.activeFocus ? palette.highlight : palette.dark - } + Events { + id: events - Rectangle { - anchors { left: parent.left; right: parent.right; bottom: parent.bottom } - implicitHeight: 1 - color: parent.activeFocus ? palette.highlight : palette.dark + model: eventFilter + tags: eventList.tags + + anchors.fill: parent + focus: true + + onEditingChanged: video.pause(editing) + onSelected: { + video.pause(true) + video.seek(event.time) + } + 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' + } } }