Commit 5251c44
committed
refactor: move dock context menu implementation to loader module
1. Deleted old dock context menu files from plugins/dde-dock/common
2. Created new simplified DockContextMenu class in src/loader
3. Simplified menu implementation by removing width calculation and
Wayland specific code
4. Changed PluginItem to use new DockContextMenu class
5. Moved reminder dot painting logic directly into paintEvent
6. Updated CMakeLists.txt to include new files
The change was made to:
1. Reduce complexity by removing unused features
2. Move menu implementation closer to where it's actually used
3. Simplify maintenance by having a single implementation
4. Remove dependency on Wayland-specific code in common module
refactor: 将停靠栏上下文菜单实现移至加载器模块
1. 从 plugins/dde-dock/common 删除旧的停靠栏上下文菜单文件
2. 在 src/loader 中创建新的简化版 DockContextMenu 类
3. 通过移除宽度计算和Wayland特定代码简化菜单实现
4. 修改 PluginItem 使用新的 DockContextMenu 类
5. 将提醒点绘制逻辑直接移到 paintEvent 中
6. 更新 CMakeLists.txt 包含新文件
这些修改的目的:
1. 通过移除未使用功能降低复杂性
2. 将菜单实现移到实际使用的位置
3. 通过单一实现简化维护
4. 移除公共模块中对Wayland特定代码的依赖
pms: TASK-3771991 parent 2c0ab4e commit 5251c44
7 files changed
Lines changed: 60 additions & 193 deletions
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
| 296 | + | |
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments