mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
增加亮色模式支持,小幅修改QSS和UI元素大小
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user