feat: check for "--disable-mica" arg to disable Mica effect

This commit is contained in:
uncor3
2026-04-10 16:19:00 +03:00
parent 7293514426
commit ed8b87cd4c
7 changed files with 86 additions and 40 deletions
+17
View File
@@ -46,6 +46,7 @@ SettingsWidget::SettingsWidget(QWidget *parent) : QDialog{parent}
{
#ifdef WIN32
m_backDropTypeCombo = nullptr;
m_disableMicaCheckBox = nullptr;
#endif
setupUI();
loadSettings();
@@ -144,6 +145,10 @@ void SettingsWidget::setupUI()
backDropTypeLayout->addStretch();
generalLayout->addLayout(backDropTypeLayout);
m_disableMicaCheckBox =
new QCheckBox("Disable Mica effects (also disables WinUI styles)");
generalLayout->addWidget(m_disableMicaCheckBox);
}
#endif
@@ -350,6 +355,9 @@ void SettingsWidget::loadSettings()
m_backDropTypeCombo->setCurrentIndex(0);
}
}
if (m_disableMicaCheckBox) {
m_disableMicaCheckBox->setChecked(sm->disableMica());
}
#endif
}
@@ -426,6 +434,12 @@ void SettingsWidget::connectSignals()
onSettingChanged();
});
}
if (m_disableMicaCheckBox) {
connect(m_disableMicaCheckBox, &QCheckBox::toggled, this, [this]() {
m_restartRequired = true;
onSettingChanged();
});
}
#endif
}
@@ -534,6 +548,9 @@ void SettingsWidget::saveSettings()
sm->setWinBackdropType(static_cast<WIN_BACKDROP>(data.toInt()));
}
}
if (m_disableMicaCheckBox) {
sm->setDisableMica(m_disableMicaCheckBox->isChecked());
}
#endif
}