mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 通过dconfig设置任务栏永久隐藏的同时将任务栏设置为一直隐藏并隐藏界面
文管桌面需要使用HideMode,HideState,WindowsSize等属性值 ,根据这些属性值设置桌面的可选区域大小。 若永久隐藏时修改这些属性,则需要添加新属性值来保存原始值,以便于在取消永久隐藏时来回复原始值 这样处理代码逻辑修改太多,直接设置为一直隐藏来规避 Log: 修复桌面任务栏位置依旧保持任务栏的占位区域问题 Bug: https://pms.uniontech.com/bug-view-133427.html Influence: 永久隐藏时取消点位,取消永久隐藏时任务栏进入一直隐藏模式 Change-Id: I07236101f1853212abedbb740d74f381f6ccf934
This commit is contained in:
parent
aa70b849a1
commit
cf2a6b3c6d
@ -162,6 +162,9 @@ void MainWindow::launch()
|
||||
if (m_dconfig.data()->isValid())
|
||||
showDock = !m_dconfig.data()->value("alwaysHideDock", false).toBool();
|
||||
setVisible(showDock);
|
||||
if (!showDock && m_multiScreenWorker->dockInter()) {
|
||||
m_multiScreenWorker->dockInter()->setHideMode(KeepHidden);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -308,7 +311,11 @@ void MainWindow::initComponents()
|
||||
if (m_dconfig.data()->isValid()) {
|
||||
connect(m_dconfig.data(), &DConfig::valueChanged, this, [this] (const QString &key) {
|
||||
if (key == "alwaysHideDock") {
|
||||
setVisible(!m_dconfig.data()->value(key, false).toBool());
|
||||
const bool showDock = !m_dconfig.data()->value(key, false).toBool();
|
||||
setVisible(showDock);
|
||||
if (!showDock && m_multiScreenWorker->dockInter()) {
|
||||
m_multiScreenWorker->dockInter()->setHideMode(KeepHidden);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user