mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-05-30 13:31:50 +00:00
fix: 修复控制中心调节透明度对任务栏无作用的问题
控制中心使用了Appearance的接口,任务栏需要适配 Log: 修复控制中心调节透明度对任务栏无作用的问题 Influence: 任务栏透明度调节 Task: https://pms.uniontech.com/task-view-226127.html Change-Id: I3c2edcb82155bdc65220c25c9e139d34c0e92d34
This commit is contained in:
parent
949c9eb9af
commit
3efc00ac29
101
frame/dbusinterface/xml/org.deepin.dde.Appearance1.xml
Normal file
101
frame/dbusinterface/xml/org.deepin.dde.Appearance1.xml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<interface name="org.deepin.dde.Appearance1">
|
||||||
|
<!--
|
||||||
|
<method name="Delete">
|
||||||
|
<arg direction="in" type="s" name="ty"/>
|
||||||
|
<arg direction="in" type="s" name="name"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetScaleFactor">
|
||||||
|
<arg direction="out" type="d" name="scaleFactor"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<method name="GetScreenScaleFactors">
|
||||||
|
<arg direction="out" type="a{sd}" name="scaleFactor"/>
|
||||||
|
<annotation value="ScaleFactors"
|
||||||
|
name="org.qtproject.QtDBus.QtTypeName.Out0"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetWallpaperSlideShow">
|
||||||
|
<arg direction="in" type="s" name="monitorName"/>
|
||||||
|
<arg direction="out" type="s" name="slideShow"/>
|
||||||
|
</method>
|
||||||
|
<method name="List">
|
||||||
|
<arg direction="in" type="s" name="ty"/>
|
||||||
|
<arg direction="out" type="s" name="list"/>
|
||||||
|
</method>
|
||||||
|
<method name="Reset"/>
|
||||||
|
<method name="Set">
|
||||||
|
<arg direction="in" type="s" name="ty"/>
|
||||||
|
<arg direction="in" type="s" name="value"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetMonitorBackground">
|
||||||
|
<arg direction="in" type="s" name="monitorName"/>
|
||||||
|
<arg direction="in" type="s" name="imageGile"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetScaleFactor">
|
||||||
|
<arg direction="in" type="d" name="scale"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetScreenScaleFactors">
|
||||||
|
<arg direction="in" type="a{sd}" name="scaleFactor"/>
|
||||||
|
<annotation value="ScaleFactors"
|
||||||
|
name="org.qtproject.QtDBus.QtTypeName.In0"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetWallpaperSlideShow">
|
||||||
|
<arg direction="in" type="s" name="monitorName"/>
|
||||||
|
<arg direction="in" type="s" name="slideShow"/>
|
||||||
|
</method>
|
||||||
|
<method name="Show">
|
||||||
|
<arg direction="in" type="s" name="ty"/>
|
||||||
|
<arg direction="in" type="as" name="names"/>
|
||||||
|
<arg direction="out" type="s" name="detail"/>
|
||||||
|
</method>
|
||||||
|
<method name="Thumbnail">
|
||||||
|
<arg direction="in" type="s" name="ty"/>
|
||||||
|
<arg direction="in" type="s" name="name"/>
|
||||||
|
<arg direction="out" type="s" name="file"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetCurrentWorkspaceBackground">
|
||||||
|
<arg direction="in" type="s" name="uri"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetCurrentWorkspaceBackground">
|
||||||
|
<arg direction="out" type="s" name="uri"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetCurrentWorkspaceBackgroundForMonitor">
|
||||||
|
<arg direction="in" type="s" name="uri"/>
|
||||||
|
<arg direction="in" type="s" name="strMonitorName"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetCurrentWorkspaceBackgroundForMonitor">
|
||||||
|
<arg direction="in" type="s" name="strMonitorName"/>
|
||||||
|
<arg direction="out" type="s" name="uri"/>
|
||||||
|
</method>
|
||||||
|
<method name="SetWorkspaceBackgroundForMonitor">
|
||||||
|
<arg direction="in" type="i" name="index"/>
|
||||||
|
<arg direction="in" type="s" name="strMonitorName"/>
|
||||||
|
<arg direction="in" type="s" name="uri"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetWorkspaceBackgroundForMonitor">
|
||||||
|
<arg direction="in" type="i" name="index"/>
|
||||||
|
<arg direction="in" type="s" name="strMonitorName"/>
|
||||||
|
<arg direction="out" type="s" name="uri"/>
|
||||||
|
</method>
|
||||||
|
-->
|
||||||
|
<property access="readwrite" type="d" name="FontSize"/>
|
||||||
|
<property access="readwrite" type="d" name="Opacity"/>
|
||||||
|
<property access="readwrite" type="i" name="WindowRadius"/>
|
||||||
|
<property access="read" type="s" name="Background"/>
|
||||||
|
<property access="read" type="s" name="GlobalTheme"/>
|
||||||
|
<property access="read" type="s" name="GtkTheme"/>
|
||||||
|
<property access="read" type="s" name="IconTheme"/>
|
||||||
|
<property access="read" type="s" name="CursorTheme"/>
|
||||||
|
<property access="read" type="s" name="MonospaceFont"/>
|
||||||
|
<property access="readwrite" type="s" name="QtActiveColor"/>
|
||||||
|
<property access="read" type="s" name="StandardFont"/>
|
||||||
|
<property access="readwrite" type="s" name="WallpaperSlideShow"/>
|
||||||
|
<property access="read" type="s" name="WallpaperURls"/>
|
||||||
|
<signal name="Changed">
|
||||||
|
<arg type="s" name="ty"/>
|
||||||
|
<arg type="s" name="value"/>
|
||||||
|
</signal>
|
||||||
|
<signal name="Refreshed">
|
||||||
|
<arg type="s" name="type"/>
|
||||||
|
</signal>
|
||||||
|
</interface>
|
||||||
|
|
@ -60,6 +60,7 @@ MultiScreenWorker::MultiScreenWorker(QObject *parent)
|
|||||||
, m_touchEventInter(new XEventMonitor(xEventMonitorService, xEventMonitorPath, QDBusConnection::sessionBus(), this))
|
, m_touchEventInter(new XEventMonitor(xEventMonitorService, xEventMonitorPath, QDBusConnection::sessionBus(), this))
|
||||||
, m_dockInter(new DockInter(dockServiceName(), dockServicePath(), QDBusConnection::sessionBus(), this))
|
, m_dockInter(new DockInter(dockServiceName(), dockServicePath(), QDBusConnection::sessionBus(), this))
|
||||||
, m_launcherInter(new DBusLuncher(launcherService, launcherPath, 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_monitorUpdateTimer(new QTimer(this))
|
||||||
, m_delayWakeTimer(new QTimer(this))
|
, m_delayWakeTimer(new QTimer(this))
|
||||||
, m_position(Dock::Position::Bottom)
|
, m_position(Dock::Position::Bottom)
|
||||||
@ -591,7 +592,7 @@ void MultiScreenWorker::initUI()
|
|||||||
onPositionChanged(dockInter()->position());
|
onPositionChanged(dockInter()->position());
|
||||||
onDisplayModeChanged(dockInter()->displayMode());
|
onDisplayModeChanged(dockInter()->displayMode());
|
||||||
onHideModeChanged(dockInter()->hideMode());
|
onHideModeChanged(dockInter()->hideMode());
|
||||||
onOpacityChanged(m_dockInter->opacity());
|
onOpacityChanged(m_appearanceInter->opacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiScreenWorker::initDockMode()
|
void MultiScreenWorker::initDockMode()
|
||||||
@ -707,7 +708,10 @@ void MultiScreenWorker::checkDaemonDockService()
|
|||||||
|
|
||||||
emit requestUpdateFrontendGeometry();
|
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::WindowSizeEfficientChanged, this, &MultiScreenWorker::onWindowSizeChanged);
|
||||||
connect(dockInter, &DockInter::WindowSizeFashionChanged, this, &MultiScreenWorker::onWindowSizeChanged);
|
connect(dockInter, &DockInter::WindowSizeFashionChanged, this, &MultiScreenWorker::onWindowSizeChanged);
|
||||||
};
|
};
|
||||||
@ -732,7 +736,7 @@ void MultiScreenWorker::checkDaemonDockService()
|
|||||||
onDisplayModeChanged(dockInter()->displayMode());
|
onDisplayModeChanged(dockInter()->displayMode());
|
||||||
onHideModeChanged(dockInter()->hideMode());
|
onHideModeChanged(dockInter()->hideMode());
|
||||||
onHideStateChanged(dockInter()->hideState());
|
onHideStateChanged(dockInter()->hideState());
|
||||||
onOpacityChanged(m_dockInter->opacity());
|
onOpacityChanged(m_appearanceInter->opacity());
|
||||||
|
|
||||||
disconnect(ifc);
|
disconnect(ifc);
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "org_deepin_dde_xeventmonitor1.h"
|
#include "org_deepin_dde_xeventmonitor1.h"
|
||||||
#include "org_deepin_dde_launcher1.h"
|
#include "org_deepin_dde_launcher1.h"
|
||||||
|
#include "org_deepin_dde_appearance1.h"
|
||||||
|
|
||||||
#include <DWindowManagerHelper>
|
#include <DWindowManagerHelper>
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ DGUI_USE_NAMESPACE
|
|||||||
|
|
||||||
using XEventMonitor = ::org::deepin::dde::XEventMonitor1;
|
using XEventMonitor = ::org::deepin::dde::XEventMonitor1;
|
||||||
using DBusLuncher = ::org::deepin::dde::Launcher1;
|
using DBusLuncher = ::org::deepin::dde::Launcher1;
|
||||||
|
using Appearance = org::deepin::dde::Appearance1;
|
||||||
|
|
||||||
using namespace Dock;
|
using namespace Dock;
|
||||||
class QVariantAnimation;
|
class QVariantAnimation;
|
||||||
@ -191,6 +193,7 @@ private:
|
|||||||
// DBus interface
|
// DBus interface
|
||||||
DockInter *m_dockInter;
|
DockInter *m_dockInter;
|
||||||
DBusLuncher *m_launcherInter;
|
DBusLuncher *m_launcherInter;
|
||||||
|
Appearance *m_appearanceInter;
|
||||||
|
|
||||||
// update monitor info
|
// update monitor info
|
||||||
QTimer *m_monitorUpdateTimer;
|
QTimer *m_monitorUpdateTimer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user