mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: window radius is not set
as title
This commit is contained in:
parent
50bbc3cf01
commit
dc77b8904d
@ -45,7 +45,6 @@ MainWindowBase::MainWindowBase(MultiScreenWorker *multiScreenWorker, QWidget *pa
|
|||||||
, m_platformWindowHandle(this)
|
, m_platformWindowHandle(this)
|
||||||
, m_shadowMaskOptimizeTimer(new QTimer(this))
|
, m_shadowMaskOptimizeTimer(new QTimer(this))
|
||||||
, m_isShow(false)
|
, m_isShow(false)
|
||||||
, m_borderRadius(0)
|
|
||||||
, m_order(0)
|
, m_order(0)
|
||||||
{
|
{
|
||||||
initUi();
|
initUi();
|
||||||
@ -110,9 +109,6 @@ void MainWindowBase::initConnection()
|
|||||||
connect(DWindowManagerHelper::instance(), &DWindowManagerHelper::hasCompositeChanged, m_shadowMaskOptimizeTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
connect(DWindowManagerHelper::instance(), &DWindowManagerHelper::hasCompositeChanged, m_shadowMaskOptimizeTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||||
connect(m_shadowMaskOptimizeTimer, &QTimer::timeout, this, &MainWindowBase::adjustShadowMask, Qt::QueuedConnection);
|
connect(m_shadowMaskOptimizeTimer, &QTimer::timeout, this, &MainWindowBase::adjustShadowMask, Qt::QueuedConnection);
|
||||||
|
|
||||||
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_dragWidget, &DragWidget::dragFinished, this, [ = ] {
|
connect(m_dragWidget, &DragWidget::dragFinished, this, [ = ] {
|
||||||
Utils::setIsDraging(false);
|
Utils::setIsDraging(false);
|
||||||
});
|
});
|
||||||
@ -339,7 +335,7 @@ void MainWindowBase::adjustShadowMask()
|
|||||||
if (!m_isShow || m_shadowMaskOptimizeTimer->isActive())
|
if (!m_isShow || m_shadowMaskOptimizeTimer->isActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_platformWindowHandle.setWindowRadius(m_borderRadius);
|
m_platformWindowHandle.setWindowRadius(getBorderRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowBase::onCompositeChanged()
|
void MainWindowBase::onCompositeChanged()
|
||||||
@ -580,12 +576,6 @@ void MainWindowBase::resizeEvent(QResizeEvent *event)
|
|||||||
{
|
{
|
||||||
updateDragGeometry();
|
updateDragGeometry();
|
||||||
|
|
||||||
int borderRadius = getBorderRadius();
|
|
||||||
if (borderRadius != m_borderRadius) {
|
|
||||||
m_borderRadius = borderRadius;
|
|
||||||
updateRadius(m_borderRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_shadowMaskOptimizeTimer->start();
|
m_shadowMaskOptimizeTimer->start();
|
||||||
|
|
||||||
if (!isDraging())
|
if (!isDraging())
|
||||||
|
@ -98,7 +98,6 @@ private:
|
|||||||
DPlatformWindowHandle m_platformWindowHandle;
|
DPlatformWindowHandle m_platformWindowHandle;
|
||||||
QTimer *m_shadowMaskOptimizeTimer;
|
QTimer *m_shadowMaskOptimizeTimer;
|
||||||
bool m_isShow;
|
bool m_isShow;
|
||||||
int m_borderRadius;
|
|
||||||
int m_order;
|
int m_order;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user