mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
[LayoutSettings] Move over layout settings in global.ini (#6587)
* [LayoutSettings] Move over some settings from general * remove unused setting
This commit is contained in:
parent
a80a0531a6
commit
804a60f1ea
7 changed files with 49 additions and 61 deletions
|
|
@ -189,11 +189,11 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
|
||||
setWindowTitle(tr("Manage sets"));
|
||||
setMinimumSize(800, 500);
|
||||
auto &geometry = SettingsCache::instance().getSetsDialogGeometry();
|
||||
auto geometry = SettingsCache::instance().layouts().getSetsDialogGeometry();
|
||||
if (!geometry.isEmpty()) {
|
||||
restoreGeometry(geometry);
|
||||
}
|
||||
auto &headerState = SettingsCache::instance().layouts().getSetsDialogHeaderState();
|
||||
auto headerState = SettingsCache::instance().layouts().getSetsDialogHeaderState();
|
||||
if (!headerState.isEmpty()) {
|
||||
view->header()->restoreState(headerState);
|
||||
view->header()->setSortIndicator(SORT_RESET, Qt::DescendingOrder);
|
||||
|
|
@ -209,7 +209,7 @@ WndSets::~WndSets()
|
|||
|
||||
void WndSets::closeEvent(QCloseEvent * /*ev*/)
|
||||
{
|
||||
SettingsCache::instance().setSetsDialogGeometry(saveGeometry());
|
||||
SettingsCache::instance().layouts().setSetsDialogGeometry(saveGeometry());
|
||||
}
|
||||
|
||||
void WndSets::saveHeaderState()
|
||||
|
|
|
|||
|
|
@ -879,7 +879,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
retranslateUi();
|
||||
|
||||
if (!restoreGeometry(SettingsCache::instance().getMainWindowGeometry())) {
|
||||
if (!restoreGeometry(SettingsCache::instance().layouts().getMainWindowGeometry())) {
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
}
|
||||
aFullScreen->setChecked(static_cast<bool>(windowState() & Qt::WindowFullScreen));
|
||||
|
|
@ -1098,7 +1098,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
tip->close();
|
||||
|
||||
event->accept();
|
||||
SettingsCache::instance().setMainWindowGeometry(saveGeometry());
|
||||
SettingsCache::instance().layouts().setMainWindowGeometry(saveGeometry());
|
||||
tabSupervisor->deleteLater();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue