mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: fix dde-dock windowRadius bug
fix windowRadius about dde-dock Log: Bug: https://pms.uniontech.com/zentao/bug-view-58296.html Change-Id: I1565cd0209ca7a9c27a0d6b151ae43c407917540
This commit is contained in:
parent
5206fbb3eb
commit
4550cab197
@ -254,7 +254,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
||||
// 任务栏大小、位置、模式改变都会触发resize,发射大小改变信号,供依赖项目更新位置
|
||||
Q_EMIT panelGeometryChanged();
|
||||
|
||||
adjustShadowMask();
|
||||
m_shadowMaskOptimizeTimer->start();
|
||||
|
||||
return DBlurEffectWidget::resizeEvent(event);
|
||||
}
|
||||
@ -301,8 +301,9 @@ void MainWindow::initConnections()
|
||||
{
|
||||
connect(m_shadowMaskOptimizeTimer, &QTimer::timeout, this, &MainWindow::adjustShadowMask, Qt::QueuedConnection);
|
||||
|
||||
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &MainWindow::compositeChanged, Qt::QueuedConnection);
|
||||
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, m_shadowMaskOptimizeTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
connect(&m_platformWindowHandle, &DPlatformWindowHandle::frameMarginsChanged, m_shadowMaskOptimizeTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
connect(&m_platformWindowHandle, &DPlatformWindowHandle::windowRadiusChanged, m_shadowMaskOptimizeTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
|
||||
connect(m_dbusDaemonInterface, &QDBusConnectionInterface::serviceOwnerChanged, this, &MainWindow::onDbusNameOwnerChanged);
|
||||
|
||||
@ -378,10 +379,6 @@ void MainWindow::adjustShadowMask()
|
||||
clipPath.addRect(QRect(QPoint(0, 0), this->geometry().size()));
|
||||
|
||||
m_platformWindowHandle.setClipPath(newRadius != 0 ? QPainterPath() : clipPath);
|
||||
|
||||
// 临时解决方案: 在控制中心修改圆角之后, 会过几秒才会刷新显示 ???
|
||||
if (Dtk::Core::DSysInfo::isCommunityEdition())
|
||||
update();
|
||||
}
|
||||
|
||||
void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
|
||||
|
Loading…
x
Reference in New Issue
Block a user