mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-04-30 14:44:31 +02:00
Try best to avoid regression
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
f08478c7ec
commit
513959750f
@ -47,6 +47,18 @@ SystemTheme::SystemTheme(const QString& styleName, bool isDefaultTheme)
|
|||||||
colorPalette = QStyleFactory::create(styleName)->standardPalette();
|
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()
|
QString SystemTheme::id()
|
||||||
{
|
{
|
||||||
return themeName;
|
return themeName;
|
||||||
|
@ -40,6 +40,7 @@ class SystemTheme : public ITheme {
|
|||||||
public:
|
public:
|
||||||
SystemTheme(const QString& styleName, bool isDefaultTheme);
|
SystemTheme(const QString& styleName, bool isDefaultTheme);
|
||||||
virtual ~SystemTheme() {}
|
virtual ~SystemTheme() {}
|
||||||
|
void apply(bool initial) override;
|
||||||
|
|
||||||
QString id() override;
|
QString id() override;
|
||||||
QString name() override;
|
QString name() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user