diff --git a/frame/dbusinterface/xml/org.deepin.dde.Appearance1.xml b/frame/dbusinterface/xml/org.deepin.dde.Appearance1.xml
new file mode 100644
index 000000000..973b140ba
--- /dev/null
+++ b/frame/dbusinterface/xml/org.deepin.dde.Appearance1.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp
index e24141166..ec9dad4ea 100644
--- a/frame/util/multiscreenworker.cpp
+++ b/frame/util/multiscreenworker.cpp
@@ -60,6 +60,7 @@ MultiScreenWorker::MultiScreenWorker(QObject *parent)
, m_touchEventInter(new XEventMonitor(xEventMonitorService, xEventMonitorPath, QDBusConnection::sessionBus(), this))
, m_dockInter(new DockInter(dockServiceName(), dockServicePath(), QDBusConnection::sessionBus(), this))
, m_launcherInter(new DBusLuncher(launcherService, launcherPath, QDBusConnection::sessionBus(), this))
+ , m_appearanceInter(new Appearance("org.deepin.dde.Appearance1", "/org/deepin/dde/Appearance1", QDBusConnection::sessionBus(), this))
, m_monitorUpdateTimer(new QTimer(this))
, m_delayWakeTimer(new QTimer(this))
, m_position(Dock::Position::Bottom)
@@ -591,7 +592,7 @@ void MultiScreenWorker::initUI()
onPositionChanged(dockInter()->position());
onDisplayModeChanged(dockInter()->displayMode());
onHideModeChanged(dockInter()->hideMode());
- onOpacityChanged(m_dockInter->opacity());
+ onOpacityChanged(m_appearanceInter->opacity());
}
void MultiScreenWorker::initDockMode()
@@ -707,7 +708,10 @@ void MultiScreenWorker::checkDaemonDockService()
emit requestUpdateFrontendGeometry();
});
- connect(dockInter, &DockInter::OpacityChanged, this, &MultiScreenWorker::onOpacityChanged);
+ connect(m_appearanceInter, &Appearance::Changed, this, [ this ](const QString &ty, const QString &value) {
+ if (ty == "windowopacity")
+ onOpacityChanged(value.toDouble());
+ });
connect(dockInter, &DockInter::WindowSizeEfficientChanged, this, &MultiScreenWorker::onWindowSizeChanged);
connect(dockInter, &DockInter::WindowSizeFashionChanged, this, &MultiScreenWorker::onWindowSizeChanged);
};
@@ -732,7 +736,7 @@ void MultiScreenWorker::checkDaemonDockService()
onDisplayModeChanged(dockInter()->displayMode());
onHideModeChanged(dockInter()->hideMode());
onHideStateChanged(dockInter()->hideState());
- onOpacityChanged(m_dockInter->opacity());
+ onOpacityChanged(m_appearanceInter->opacity());
disconnect(ifc);
}
diff --git a/frame/util/multiscreenworker.h b/frame/util/multiscreenworker.h
index dc5b517ad..ee276598b 100644
--- a/frame/util/multiscreenworker.h
+++ b/frame/util/multiscreenworker.h
@@ -30,6 +30,7 @@
#include "org_deepin_dde_xeventmonitor1.h"
#include "org_deepin_dde_launcher1.h"
+#include "org_deepin_dde_appearance1.h"
#include
@@ -55,6 +56,7 @@ DGUI_USE_NAMESPACE
using XEventMonitor = ::org::deepin::dde::XEventMonitor1;
using DBusLuncher = ::org::deepin::dde::Launcher1;
+using Appearance = org::deepin::dde::Appearance1;
using namespace Dock;
class QVariantAnimation;
@@ -191,6 +193,7 @@ private:
// DBus interface
DockInter *m_dockInter;
DBusLuncher *m_launcherInter;
+ Appearance *m_appearanceInter;
// update monitor info
QTimer *m_monitorUpdateTimer;