增加亮色模式支持,小幅修改QSS和UI元素大小

This commit is contained in:
RigoLigoRLC
2021-08-19 21:23:58 +08:00
parent 04ebc6ed20
commit 5cbd758f67
9 changed files with 55 additions and 24 deletions

View File

@@ -11,6 +11,10 @@ void SpkDtkPluginImpl::Initialize()
&DPlatformTheme::activeColorChanged,
this,
&SpkDtkPluginImpl::AccentColorChanged);
connect(DGuiApplicationHelper::instance(),
&DGuiApplicationHelper::themeTypeChanged,
this,
&SpkDtkPluginImpl::DarkLightThemeChanged);
}
void SpkDtkPluginImpl::addWindow(QWidget *w, QObject *parent)
@@ -23,3 +27,8 @@ QColor SpkDtkPluginImpl::GetAccentColor()
{
return DGuiApplicationHelper::instance()->systemTheme()->activeColor();
}
bool SpkDtkPluginImpl::GetIsDarkTheme()
{
return DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::DarkType;
}