mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Move show folders option next to the search bar.
This commit is contained in:
parent
d1102939a2
commit
04dc843c4e
2 changed files with 5 additions and 12 deletions
|
|
@ -172,7 +172,7 @@ void VisualDeckStorageFolderDisplayWidget::updateShowFolders(bool enabled)
|
|||
if (!showFolders) {
|
||||
flattenFolderStructure();
|
||||
} else {
|
||||
// if setting was switched from disabled to enabled, we assume that there isn't any existing subfolders
|
||||
// if setting was switched from disabled to enabled, we assume that there aren't any existing subfolders
|
||||
createWidgetsForFiles();
|
||||
createWidgetsForFolders();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,22 +32,16 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
|||
sortWidget = new VisualDeckStorageSortWidget(this);
|
||||
searchWidget = new VisualDeckStorageSearchWidget(this);
|
||||
|
||||
searchAndSortLayout->addWidget(deckPreviewColorIdentityFilterWidget);
|
||||
searchAndSortLayout->addWidget(sortWidget);
|
||||
searchAndSortLayout->addWidget(searchWidget);
|
||||
|
||||
// checkbox row
|
||||
QHBoxLayout *checkBoxLayout = new QHBoxLayout(this);
|
||||
checkBoxLayout->setContentsMargins(9, 0, 9, 0);
|
||||
|
||||
showFoldersCheckBox = new QCheckBox(this);
|
||||
showFoldersCheckBox->setChecked(SettingsCache::instance().getVisualDeckStorageShowFolders());
|
||||
connect(showFoldersCheckBox, &QCheckBox::QT_STATE_CHANGED, this, &VisualDeckStorageWidget::updateShowFolders);
|
||||
connect(showFoldersCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||
&SettingsCache::setVisualDeckStorageShowFolders);
|
||||
|
||||
checkBoxLayout->addWidget(showFoldersCheckBox);
|
||||
checkBoxLayout->addStretch();
|
||||
searchAndSortLayout->addWidget(deckPreviewColorIdentityFilterWidget);
|
||||
searchAndSortLayout->addWidget(sortWidget);
|
||||
searchAndSortLayout->addWidget(searchWidget);
|
||||
searchAndSortLayout->addWidget(showFoldersCheckBox);
|
||||
|
||||
// tag filter box
|
||||
tagFilterWidget = new VisualDeckStorageTagFilterWidget(this);
|
||||
|
|
@ -63,7 +57,6 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
|||
|
||||
// putting everything together
|
||||
layout->addLayout(searchAndSortLayout);
|
||||
layout->addLayout(checkBoxLayout);
|
||||
layout->addWidget(tagFilterWidget);
|
||||
layout->addWidget(scrollArea);
|
||||
layout->addWidget(cardSizeWidget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue