1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-18 11:51:44 +02:00

Moar pixels to the GridView

This commit is contained in:
Teo Mrnjavac
2013-08-03 17:22:38 +02:00
parent 9f3046ddc6
commit 5e2b1e1dd9

View File

@@ -248,7 +248,7 @@ GridView::verifySize()
scrollbar = 0; //don't count it any more
const int rectWidth = contentsRect().width() - scrollbar - 3;
const int itemWidth = scaledX( 140 );
const int itemWidth = scaledX( 160 );
const int itemsPerRow = qMax( 1, qFloor( rectWidth / itemWidth ) );
const int overlapRows = m_model->rowCount( QModelIndex() ) % itemsPerRow;
@@ -288,7 +288,7 @@ GridView::layoutItems()
scrollbar = 0; //don't count it any more
const int rectWidth = contentsRect().width() - scrollbar - 3;
const int itemWidth = scaledX( 140 );
const int itemWidth = scaledX( 160 );
const int itemsPerRow = qMax( 1, qFloor( rectWidth / itemWidth ) );
const int remSpace = rectWidth - ( itemsPerRow * itemWidth );