Skip to content

Commit

Permalink
fix: can set dock smart-hide state (#1666)
Browse files Browse the repository at this point in the history
as title

Log: as title
Issue: linuxdeepin/developer-center#10183
Influence: can set dock smart-hide
  • Loading branch information
yixinshark authored Aug 6, 2024
1 parent 6463ac8 commit 92a507d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/plugin-personalization-dock/window/dockplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@ void DockModuleObject::initStatus(ComboxWidget *widget)
widget->addBackground();
widget->setTitle(tr("Status"));
widget->setComboxOption(QStringList() << tr("Keep shown") << tr("Keep hidden") << tr("Smart hide"));
if (auto model = qobject_cast<QStandardItemModel *>(widget->comboBox()->model())) {
if (QStandardItem *itemHideSelect = model->item(2)) {
itemHideSelect->setFlags(itemHideSelect->flags() & ~Qt::ItemIsEnabled);
}
}

widget->setCurrentText(g_stateMap.key(m_dbusProxy->hideMode()));
connect(widget, &ComboxWidget::onSelectChanged, m_dbusProxy.get(), [=](const QString &text)
Expand Down

0 comments on commit 92a507d

Please sign in to comment.