mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 修复时尚模式显示模式任务栏高度显示问题
任务栏高度发生变化后,写入后端接,之前是值计算错了, Log: 修复时尚模式显示模式任务栏高度显示问题 Change-Id: I5aba6f439d0b7f7901287d0080ecb39f92a9ab54 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/1467 Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: fanpengcheng <fanpengcheng@uniontech.com>
This commit is contained in:
parent
5bd878755e
commit
60e629dbbb
@ -756,11 +756,6 @@ void MultiScreenWorker::onRequestUpdatePosition(const Position &fromPos, const P
|
|||||||
changeDockPosition(m_ds.last(), m_ds.current(), fromPos, toPos);
|
changeDockPosition(m_ds.last(), m_ds.current(), fromPos, toPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiScreenWorker::onRequestUpdateDragArea()
|
|
||||||
{
|
|
||||||
parent()->resetDragWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MultiScreenWorker::onRequestUpdateMonitorInfo()
|
void MultiScreenWorker::onRequestUpdateMonitorInfo()
|
||||||
{
|
{
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
@ -990,7 +985,6 @@ void MultiScreenWorker::initConnection()
|
|||||||
connect(this, &MultiScreenWorker::requestUpdateFrontendGeometry, this, &MultiScreenWorker::onRequestUpdateFrontendGeometry);
|
connect(this, &MultiScreenWorker::requestUpdateFrontendGeometry, this, &MultiScreenWorker::onRequestUpdateFrontendGeometry);
|
||||||
connect(this, &MultiScreenWorker::requestUpdatePosition, this, &MultiScreenWorker::onRequestUpdatePosition);
|
connect(this, &MultiScreenWorker::requestUpdatePosition, this, &MultiScreenWorker::onRequestUpdatePosition);
|
||||||
connect(this, &MultiScreenWorker::requestNotifyWindowManager, this, &MultiScreenWorker::onRequestNotifyWindowManager);
|
connect(this, &MultiScreenWorker::requestNotifyWindowManager, this, &MultiScreenWorker::onRequestNotifyWindowManager);
|
||||||
connect(this, &MultiScreenWorker::requestUpdateDragArea, this, &MultiScreenWorker::onRequestUpdateDragArea);
|
|
||||||
connect(this, &MultiScreenWorker::requestUpdateMonitorInfo, this, &MultiScreenWorker::onRequestUpdateMonitorInfo);
|
connect(this, &MultiScreenWorker::requestUpdateMonitorInfo, this, &MultiScreenWorker::onRequestUpdateMonitorInfo);
|
||||||
|
|
||||||
connect(m_monitorUpdateTimer, &QTimer::timeout, this, [ = ] {
|
connect(m_monitorUpdateTimer, &QTimer::timeout, this, [ = ] {
|
||||||
|
@ -178,12 +178,12 @@ signals:
|
|||||||
|
|
||||||
// 更新监视区域
|
// 更新监视区域
|
||||||
void requestUpdateRegionMonitor();
|
void requestUpdateRegionMonitor();
|
||||||
void requestUpdateFrontendGeometry(); //!!! 给后端的区域不能为是或宽度为0的区域,否则会带来HideState死循环切换的bug
|
void requestUpdateFrontendGeometry(); //!!! 给后端的区域不能为是或宽度为0的区域,否则会带来HideState死循环切换的bug
|
||||||
void requestNotifyWindowManager();
|
void requestNotifyWindowManager();
|
||||||
void requestUpdatePosition(const Position &fromPos, const Position &toPos);
|
void requestUpdatePosition(const Position &fromPos, const Position &toPos);
|
||||||
void requestUpdateLayout(const QString &screenName); // 界面需要根据任务栏更新布局的方向
|
void requestUpdateLayout(const QString &screenName); // 界面需要根据任务栏更新布局的方向
|
||||||
void requestUpdateDragArea(); // 更新拖拽区域
|
void requestUpdateDragArea(); // 更新拖拽区域
|
||||||
void requestUpdateMonitorInfo(); // 屏幕信息发生变化,需要更新任务栏大小,拖拽区域,所在屏幕,监控区域,通知窗管,通知后端,
|
void requestUpdateMonitorInfo(); // 屏幕信息发生变化,需要更新任务栏大小,拖拽区域,所在屏幕,监控区域,通知窗管,通知后端,
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onAutoHideChanged(bool autoHide);
|
void onAutoHideChanged(bool autoHide);
|
||||||
@ -229,7 +229,6 @@ private slots:
|
|||||||
|
|
||||||
void onRequestNotifyWindowManager();
|
void onRequestNotifyWindowManager();
|
||||||
void onRequestUpdatePosition(const Position &fromPos, const Position &toPos);
|
void onRequestUpdatePosition(const Position &fromPos, const Position &toPos);
|
||||||
void onRequestUpdateDragArea();
|
|
||||||
void onRequestUpdateMonitorInfo();
|
void onRequestUpdateMonitorInfo();
|
||||||
|
|
||||||
void updateMonitorDockedInfo();
|
void updateMonitorDockedInfo();
|
||||||
|
@ -106,8 +106,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
initComponents();
|
initComponents();
|
||||||
initConnections();
|
initConnections();
|
||||||
|
|
||||||
//TODO 优先更新一下任务栏所在屏幕
|
|
||||||
qDebug() << m_multiScreenWorker->deskScreen();
|
|
||||||
resetDragWindow();
|
resetDragWindow();
|
||||||
|
|
||||||
m_mainPanel->setDelegate(this);
|
m_mainPanel->setDelegate(this);
|
||||||
@ -312,7 +310,8 @@ void MainWindow::adjustShadowMask()
|
|||||||
|
|
||||||
QPainterPath clipPath;
|
QPainterPath clipPath;
|
||||||
clipPath.addRect(QRect(QPoint(0, 0), this->geometry().size()));
|
clipPath.addRect(QRect(QPoint(0, 0), this->geometry().size()));
|
||||||
m_platformWindowHandle.setClipPath(clipPath);
|
|
||||||
|
m_platformWindowHandle.setClipPath(newRadius != 0 ? QPainterPath() : clipPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
|
void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
|
||||||
@ -361,8 +360,12 @@ void MainWindow::resetDragWindow()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dockSize == 0)
|
if (m_multiScreenWorker->position() == Position::Left
|
||||||
m_dockSize = m_multiScreenWorker->dockRect(m_multiScreenWorker->deskScreen()).height();
|
|| m_multiScreenWorker->position() == Position::Right) {
|
||||||
|
m_dockSize = this->width();
|
||||||
|
} else {
|
||||||
|
m_dockSize = this->height();
|
||||||
|
}
|
||||||
|
|
||||||
// 通知窗管和后端更新数据
|
// 通知窗管和后端更新数据
|
||||||
m_multiScreenWorker->updateDaemonDockSize(m_dockSize); // 1.先更新任务栏高度
|
m_multiScreenWorker->updateDaemonDockSize(m_dockSize); // 1.先更新任务栏高度
|
||||||
|
Loading…
x
Reference in New Issue
Block a user