mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
feat: 添加应用图标的小窗口显示窗口名称的配置
给任务栏图标的小窗口显示窗口名称添加配置 Log: Task: https://pms.uniontech.com/zentao/task-view-92890.html Influence: 组策略配置场景 Change-Id: I330b6490408e0056ebc68ebefa1417207c26273f
This commit is contained in:
parent
a6c5c09efe
commit
254dee8455
@ -123,6 +123,10 @@ install(FILES "cmake/DdeDock/DdeDockConfig.cmake"
|
||||
install(FILES gschema/com.deepin.dde.dock.module.gschema.xml
|
||||
DESTINATION share/glib-2.0/schemas)
|
||||
|
||||
#dconfig
|
||||
file(GLOB DCONFIG_FILES "configs/*.json")
|
||||
install(FILES ${DCONFIG_FILES} DESTINATION /usr/share/dsg/apps/dde-dock/configs/)
|
||||
|
||||
# Address Sanitizer 内存错误检测工具,打开下面的编译选项可以看到调试信息,正常运行时不需要这些信息
|
||||
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fsanitize=address -O2")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -O2")
|
||||
|
20
configs/com.deepin.dde.dock.dconfig.json
Normal file
20
configs/com.deepin.dde.dock.dconfig.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"magic":"dsg.config.meta",
|
||||
"version":"1.0",
|
||||
"contents":{
|
||||
"Dock_Show_Window_name":{
|
||||
"value":0,
|
||||
"serial":0,
|
||||
"flags":"",
|
||||
"name":"Dock_Show_Window_name",
|
||||
"name[zh_CN]":"任务栏图标的小窗口显示窗口名称",
|
||||
"description[zh_CN]":"提供鼠标悬停小窗口标题显示配置,默认为悬停显示: \
|
||||
当配置为全部显示时,鼠标悬停在任务栏图标位置时所有预览窗口显示标题信息; \
|
||||
当配置为悬停显示时,鼠标仅在悬停在预览小窗口时在当前窗口显示标题信息; \
|
||||
当配置为不显示时,鼠标悬停应用位置和预览小窗口位置时都不显示标题信息;",
|
||||
"description":"0 Mouse over show;1 Always show; 2 Always hide",
|
||||
"permissions":"readwrite",
|
||||
"visibility":"public"
|
||||
}
|
||||
}
|
||||
}
|
1
debian/dde-dock.install
vendored
1
debian/dde-dock.install
vendored
@ -10,3 +10,4 @@ usr/lib/dde-dock/plugins/system-trays
|
||||
usr/lib/dde-dock/plugins/libmultitasking.so
|
||||
usr/lib/dde-dock/plugins/libshow-desktop.so
|
||||
usr/lib/dde-dock/plugins/libkeyboard-layout.so
|
||||
usr/share/dsg/apps/dde-dock/configs/
|
@ -41,8 +41,10 @@
|
||||
#include <QGSettings>
|
||||
|
||||
#include <DGuiApplicationHelper>
|
||||
#include <DConfig>
|
||||
|
||||
DGUI_USE_NAMESPACE
|
||||
DCORE_USE_NAMESPACE
|
||||
|
||||
#define APP_DRAG_THRESHOLD 20
|
||||
|
||||
@ -69,6 +71,7 @@ AppItem::AppItem(const QGSettings *appSettings, const QGSettings *activeAppSetti
|
||||
, m_retryObtainIconTimer(new QTimer(this))
|
||||
, m_refershIconTimer(new QTimer(this))
|
||||
, m_themeType(DGuiApplicationHelper::instance()->themeType())
|
||||
, m_config(new DConfig(QString("com.deepin.dde.dock.dconfig"), QString(), this))
|
||||
{
|
||||
QHBoxLayout *centralLayout = new QHBoxLayout;
|
||||
centralLayout->setMargin(0);
|
||||
@ -663,9 +666,8 @@ void AppItem::showPreview()
|
||||
connect(m_appPreviewTips, &PreviewContainer::requestHidePopup, this, &AppItem::onResetPreview);
|
||||
|
||||
// 预览标题显示方式的配置
|
||||
if (m_activeAppSettings->keys().contains("previewTitle")) {
|
||||
m_appPreviewTips->setTitleDisplayMode(m_activeAppSettings->get("previewTitle").toInt());
|
||||
}
|
||||
if (m_config->isValid() && m_config->keyList().contains("Dock_Show_Window_name"))
|
||||
m_appPreviewTips->setTitleDisplayMode(m_config->value("Dock_Show_Window_name").toInt());
|
||||
|
||||
showPopupWindow(m_appPreviewTips, true);
|
||||
}
|
||||
|
@ -38,6 +38,11 @@
|
||||
|
||||
using DockEntryInter = com::deepin::dde::daemon::dock::Entry;
|
||||
class QGSettings;
|
||||
|
||||
DCORE_BEGIN_NAMESPACE
|
||||
class DConfig;
|
||||
DCORE_END_NAMESPACE
|
||||
|
||||
class AppItem : public DockItem
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -143,6 +148,7 @@ private:
|
||||
DGuiApplicationHelper::ColorType m_themeType;
|
||||
|
||||
static QPoint MousePressPos;
|
||||
DTK_CORE_NAMESPACE::DConfig *m_config;
|
||||
};
|
||||
|
||||
#endif // APPITEM_H
|
||||
|
@ -62,13 +62,6 @@
|
||||
Control Module Enable
|
||||
</description>
|
||||
</key>
|
||||
<key type="u" name="preview-title">
|
||||
<default>0</default>
|
||||
<summary>0 Mouse over show;1 Always show; 2 Always hide </summary>
|
||||
<description>
|
||||
The display mode of the application preview
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
<schema path="/com/deepin/dde/dock/module/dockapp/" id="com.deepin.dde.dock.module.dockapp" gettext-domain="DDE">
|
||||
<key type="b" name="control">
|
||||
|
Loading…
x
Reference in New Issue
Block a user