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 { Frame {
id: events
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Layout.rightMargin: -control.padding Layout.rightMargin: -control.padding
focus: true padding: 1
model: eventFilter rightPadding: 0
tags: eventList.tags background: Rectangle {
color: 'transparent'
onEditingChanged: video.pause(editing) border.color: events.activeFocus ? palette.highlight : palette.dark
onSelected: { radius: 2
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'
} }
Rectangle { Events {
anchors { left: parent.left; right: parent.right; top: parent.top } id: events
implicitHeight: 1
color: parent.activeFocus ? palette.highlight : palette.dark
}
Rectangle { model: eventFilter
anchors { left: parent.left; right: parent.right; bottom: parent.bottom } tags: eventList.tags
implicitHeight: 1
color: parent.activeFocus ? palette.highlight : palette.dark 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'
}
} }
} }