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