mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: 增加强制在任务栏显示插件的接口
一些插件无需在控制中心设置,必须在任务栏显示,例如截图计时、快捷插件组合图标等,因此,增加该接口对这类插件的处理 Log: 增加任务栏显示插件的标记 Influence: 截图,观察任务栏是否有计时的图标 Task: https://pms.uniontech.com/task-view-226407.html Bug: https://pms.uniontech.com/bug-view-179083.html Change-Id: Ifaa71182ee1d19633460db76302dc1ad094ab91f
This commit is contained in:
parent
9619df590c
commit
253d0af770
@ -169,8 +169,8 @@ void QuickPluginModel::initConnection()
|
||||
if (quickWidget && !quickWidget->parentWidget())
|
||||
quickWidget->setVisible(false);
|
||||
|
||||
// 用来读取已经固定在下方的插件
|
||||
if (!m_dockedPluginIndex.contains(itemInter->pluginName()))
|
||||
// 用来读取已经固定在下方的插件或者强制显示的插件
|
||||
if (!m_dockedPluginIndex.contains(itemInter->pluginName()) && !(itemInter->flags() & Attribute_ForceDock))
|
||||
return;
|
||||
|
||||
m_dockedPluginsItems << itemInter;
|
||||
@ -279,7 +279,6 @@ int QuickPluginModel::generaIndex(int insertIndex, int oldIndex)
|
||||
if (pluginDockIndex >= insertIndex) {
|
||||
m_dockedPluginIndex[itemInter->pluginName()]++;
|
||||
}
|
||||
qInfo() << itemInter->pluginDisplayName() << m_dockedPluginIndex[itemInter->pluginName()];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ enum PluginFlag {
|
||||
Attribute_CanDrag = 0x200, // 插件属性-是否支持拖动
|
||||
Attribute_CanInsert = 0x400, // 插件属性-是否支持在其前面插入其他的插件,普通的快捷插件是支持的
|
||||
Attribute_CanSetting = 0x800, // 插件属性-是否可以在控制中心设置显示或隐藏
|
||||
Attribute_ForceDock = 0x1000, // 插件属性-强制显示在任务栏上
|
||||
|
||||
FlagMask = 0xffffffff // 掩码
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user