Commit a182eb8
feat: add display scaling support in desktop integration
1. Added scaleFactor() method to DesktopIntegration class to expose
display scaling factor
2. Implemented scaleFactor() in Appearance class with DBus interface to
get actual system scaling factor
3. Modified AppItemMenu.qml to only show scaling menu when scale factor
is not 1.0 (100%)
4. Added default fallback value of 1.0 when DBus interface is not
available
The changes allow proper handling of display scaling in the UI,
particularly for the application menu where scaling options should only
appear when needed (non-default scaling). This improves user experience
on high-DPI displays.
feat: 在桌面集成中添加显示缩放支持
1. 在DesktopIntegration类中添加scaleFactor()方法以暴露显示缩放因子
2. 在Appearance类中实现scaleFactor(),通过DBus接口获取系统实际缩放因子
3. 修改AppItemMenu.qml,仅在缩放因子不为1.0(100%)时显示缩放菜单
4. 当DBus接口不可用时添加默认回退值1.0
这些更改使得UI能够正确处理显示缩放,特别是应用菜单中的缩放选项现在只会在
需要时(非默认缩放)出现。这提高了在高DPI显示器上的用户体验。
Pms: BUG-3170631 parent e0eb3bb commit a182eb8
5 files changed
Lines changed: 19 additions & 1 deletion
File tree
- shell-launcher-applet/package
- src/ddeintegration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments