Commit a1edb93
committed
perf: optimize dock network plugin panel height resizing frequency
Introduced a QTimer to debounce the updateSize calls within the
DockContentWidget. This heavily reduces the number of layout and
geometry calculation events fired to the compositor (max 1 per
150ms) when rapidly scanning and appending Wi-Fi hotspots, thereby
fixing visual flickering issues in Wayland without leaving dead space.
性能:优化任务栏网络插件面板高度调整频率
在 DockContentWidget 内部引入了 QTimer 对 updateSize 调用进行节流
(防抖)处理。扫描并连续追加 Wi-Fi 热点时,大幅减少发往合成器的
布局与几何计算事件(受限于最多 150ms 一次),从而修复了 Wayland 下
因窗口频繁变尺寸而引发的闪烁问题,同时也完整保留了正常的自适应包
裹尺寸机制。
Log: optimize dock network plugin panel height resizing frequency1 parent 7b4cd8b commit a1edb93
1 file changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
74 | 88 | | |
75 | 89 | | |
76 | 90 | | |
| |||
93 | 107 | | |
94 | 108 | | |
95 | 109 | | |
96 | | - | |
| 110 | + | |
97 | 111 | | |
98 | 112 | | |
99 | | - | |
| 113 | + | |
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
| |||
115 | 129 | | |
116 | 130 | | |
117 | 131 | | |
| 132 | + | |
118 | 133 | | |
119 | 134 | | |
120 | 135 | | |
| |||
0 commit comments