fix score browser sizehint
This commit is contained in:
parent
3911aaaa7b
commit
29dd9c8280
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue