Commit 6c999209 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

rework sizing of the grid delegate

parent 366adde0
......@@ -89,9 +89,7 @@ Item {
property int navigationBarHeight: 100
property int navigationBarFilterHeight: 44
property real gridDelegateThumbnail: 0.85
property int gridDelegateHeight: 170 * gridDelegateThumbnail + layoutVerticalMargin
property int gridDelegateWidth: 170
property int gridDelegateSize: 170
property int viewSelectorDelegateHeight: 24
......
......@@ -140,12 +140,11 @@ FocusScope {
}
}
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateWidth), 2))
cellHeight: elisaTheme.gridDelegateHeight +
(secondaryLabelSize.boundingRect.height - secondaryLabelSize.boundingRect.y)
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateSize), 2))
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + elisaTheme.layoutVerticalMargin * 2
delegate: GridBrowserDelegate {
width: elisaTheme.gridDelegateWidth
width: elisaTheme.gridDelegateSize
height: contentDirectoryView.cellHeight
focus: true
......
This diff is collapsed.
......@@ -125,13 +125,11 @@ FocusScope {
anchors.fill: contentDirectoryView
}
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateWidth), 2))
cellHeight: elisaTheme.gridDelegateHeight +
(secondaryLabelSize.boundingRect.height - secondaryLabelSize.boundingRect.y) *
(delegateDisplaySecondaryText ? 2 : 1)
cellWidth: Math.floor(availableWidth / Math.max(Math.floor(availableWidth / elisaTheme.gridDelegateSize), 2))
cellHeight: elisaTheme.gridDelegateSize + secondaryLabelSize.boundingRect.height * 2 + elisaTheme.layoutVerticalMargin * 2
delegate: GridBrowserDelegate {
width: elisaTheme.gridDelegateWidth
width: elisaTheme.gridDelegateSize
height: contentDirectoryView.cellHeight
focus: true
......
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