fix(RPImportDialog): allow changing item size to accomodate wrapped text

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-11-25 11:51:08 -03:00
parent f916ce8752
commit bae0a0530b
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -24,10 +24,10 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa
contentsWidget->setResizeMode(QListView::Adjust); contentsWidget->setResizeMode(QListView::Adjust);
contentsWidget->setSelectionMode(QAbstractItemView::SingleSelection); contentsWidget->setSelectionMode(QAbstractItemView::SingleSelection);
contentsWidget->setSpacing(5); contentsWidget->setSpacing(5);
contentsWidget->setWordWrap(false);
contentsWidget->setWrapping(true);
contentsWidget->setUniformItemSizes(true);
contentsWidget->setWordWrap(true); contentsWidget->setWordWrap(true);
contentsWidget->setWrapping(true);
// NOTE: We can't have uniform sizes because the text may wrap if it's too long. If we set this, it will cut off the wrapped text.
contentsWidget->setUniformItemSizes(false);
contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);