Try best to avoid regression

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
(cherry picked from commit 513959750f23719b55030cd34b9a8f5b248289c5)
This commit is contained in:
TheKodeToad 2025-03-23 14:29:58 +00:00 committed by github-actions[bot]
parent 57120e0c9d
commit d0a77df703
2 changed files with 13 additions and 0 deletions

View File

@ -47,6 +47,18 @@ SystemTheme::SystemTheme(const QString& styleName, bool isDefaultTheme)
colorPalette = QStyleFactory::create(styleName)->standardPalette();
}
void SystemTheme::apply(bool initial)
{
// See https://github.com/MultiMC/Launcher/issues/1790
// or https://github.com/PrismLauncher/PrismLauncher/issues/490
if (initial && themeName == "system") {
QApplication::setStyle(new HintOverrideProxyStyle(QStyleFactory::create(qtTheme())));
return;
}
ITheme::apply(initial);
}
QString SystemTheme::id()
{
return themeName;

View File

@ -40,6 +40,7 @@ class SystemTheme : public ITheme {
public:
SystemTheme(const QString& styleName, bool isDefaultTheme);
virtual ~SystemTheme() {}
void apply(bool initial) override;
QString id() override;
QString name() override;