Commit f807e02a authored by Alexander Stippich's avatar Alexander Stippich
Browse files

compute playlist delegate height based on font size

parent 15e58cfb
......@@ -42,14 +42,6 @@ Item {
property int layoutHorizontalMargin: 8
property int layoutVerticalMargin: 6
// FIXME: don't hardcode these; derive them from the layouts they're used in
FontMetrics {
id: playListTrackTextHeight
font.weight: Font.Bold
}
property int playListDelegateHeight: (playListTrackTextHeight.height > 28) ? playListTrackTextHeight.height : 28
// END FIXME
property int playListAlbumArtSize: 60
property int coverImageSize: 180
......
......@@ -56,12 +56,18 @@ FocusScope {
Accessible.role: Accessible.ListItem
Accessible.name: title + ' ' + album + ' ' + artist
TextMetrics {
id: mainCompactLabelSize
font: mainCompactLabel.font
text: mainCompactLabel.text
}
Keys.onReturnPressed: {
playListEntry.switchToTrack(playListEntry.index)
playListEntry.startPlayback()
}
height: elisaTheme.playListDelegateHeight
height: mainCompactLabelSize.height + 2 * elisaTheme.layoutVerticalMargin
Loader {
id: metadataLoader
......
Markdown is supported
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