Commit 5f0ee20f authored by Nate Graham's avatar Nate Graham
Browse files

Remove extra separator lines in Playlist

We deliberately turn off separator lines in the list item, but then
manually add more outside of it, in the delegate that contains the list
item code.

This was originally done when introducing the new album headers view
that only appears when tracks from the same album are intermixed with
tracks all from different albums, but in retrospect, it's probably too
visually heavy, and we should only use the standard separators that some
from the list items themselves if we want separator lines here.

(cherry picked from commit 8074335e)
parent 860f9b04
Pipeline #276052 passed with stage
in 4 minutes and 43 seconds
......@@ -211,43 +211,6 @@ Kirigami.Page {
showDragHandle: playListView.count > 1
}
}
// separator
Rectangle {
readonly property bool largeSeparator: entry.currentAlbum && (entry.previousAlbum === entry.currentAlbum) && (entry.nextAlbum !== entry.currentAlbum) && !playListDelegate.nextDelegateHasSection
implicitWidth: playListView.width - (largeSeparator ? 0 : Kirigami.Units.iconSizes.smallMedium)
implicitHeight: largeSeparator ? Kirigami.Units.largeSpacing : 1
Layout.alignment: Qt.AlignHCenter
// the last item should never have the separator
visible: index < playListView.count - 1
// same color with Kirigami.ListSectionHeader
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Window
color: Kirigami.Theme.backgroundColor
Connections {
target: entry
function onSectionVisibleChanged() {
var previousDelegate = playListView.itemAtIndex(model.index - 1)
if (previousDelegate) {
previousDelegate.nextDelegateHasSection = entry.sectionVisible
}
}
}
Connections {
target: entry
function onNextAlbumChanged() {
var nextDelegate = playListView.itemAtIndex(model.index + 1)
if (nextDelegate) {
playListDelegate.nextDelegateHasSection = nextDelegate.entry.sectionVisible
}
}
}
}
}
onCountChanged: if (count === 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment