fix score browser sizehint

This commit is contained in:
lasconic 2015-03-05 19:00:18 +01:00
parent 3911aaaa7b
commit 29dd9c8280
2 changed files with 3 additions and 2 deletions

View file

@ -73,7 +73,7 @@ ScoreListWidget* ScoreBrowser::createScoreList()
sl->setWrapping(true);
sl->setViewMode(QListView::IconMode);
sl->setIconSize(QSize(sl->cellWidth(), sl->cellHeight() - 30));
sl->setSpacing(10);
sl->setSpacing(sl->space());
sl->setResizeMode(QListView::Adjust);
sl->setFlow(QListView::LeftToRight);
sl->setMovement(QListView::Static);

View file

@ -29,7 +29,7 @@ class ScoreListWidget : public QListWidget
Q_OBJECT
int CELLW { 140 };
int CELLH { 228 };
int SPACE { 2 };
int SPACE { 10 };
virtual QSize sizeHint() const override;
@ -37,6 +37,7 @@ class ScoreListWidget : public QListWidget
ScoreListWidget(QWidget* parent = 0) : QListWidget(parent) {}
int cellWidth() const { return CELLW; }
int cellHeight() const { return CELLH; }
int space() const { return SPACE; }
QSize cellSize() const { return QSize(CELLW, CELLH); }
};