[LayoutSettings] Move over layout settings in global.ini (#6587)

* [LayoutSettings] Move over some settings from general

* remove unused setting
This commit is contained in:
RickyRister 2026-02-07 19:51:12 -08:00 committed by GitHub
parent a80a0531a6
commit 804a60f1ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 49 additions and 61 deletions

View file

@ -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()

View file

@ -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();
}