mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
使主题色依照DDE主题色改变
因为AUTOMOC不会在编译主程序的时候再对插件接口类进行MOC,所以需要在主程序内加一份一模一样的插件接口类定义。
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
#include <DGuiApplicationHelper>
|
||||
#include <DPlatformWindowHandle>
|
||||
#include <DPlatformTheme>
|
||||
#include "spkdtkplugin_impl.h"
|
||||
|
||||
using Dtk::Widget::DPlatformWindowHandle;
|
||||
|
||||
void SpkDtkPluginImpl::Initialize()
|
||||
{
|
||||
connect(DGuiApplicationHelper::instance()->systemTheme(),
|
||||
&DPlatformTheme::activeColorChanged,
|
||||
this,
|
||||
&SpkDtkPluginImpl::AccentColorChanged);
|
||||
}
|
||||
|
||||
void SpkDtkPluginImpl::addWindow(QWidget *w, QObject *parent)
|
||||
{
|
||||
DPlatformWindowHandle *h = new DPlatformWindowHandle(w, parent);
|
||||
Q_UNUSED(h);
|
||||
}
|
||||
|
||||
QColor SpkDtkPluginImpl::GetAccentColor()
|
||||
{
|
||||
return DGuiApplicationHelper::instance()->systemTheme()->activeColor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user