Sidebar: add left border to event list

This commit is contained in:
Timotej Lazar 2021-09-15 22:03:11 +02:00
parent 65daa139a4
commit 97422bb60a
No known key found for this signature in database
GPG key ID: B6F38793D143456F

View file

@ -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'
}
}
}