Commit 8fb0eb7
committed
fix: adjust notification center width calculation
Changed width calculation from hardcoded values to use
NotifyStyle.contentItem.width for consistent styling
Added proper scrollbar width calculation in NotifyCenter to account for
scrollbar presence
Updated main window width calculation to include proper padding handling
Fixed anchor margins and right constraints to ensure proper layout with
dynamic width
Added contentPadding property for better maintainability of spacing
values
Log: Fixed notification center layout issues with dynamic width
calculation
Influence:
1. Test notification center display with different content widths
2. Verify scrollbar appears correctly and doesn't cause layout issues
3. Check that all notification items maintain consistent width
4. Test window resizing behavior and content alignment
5. Verify margins and padding are applied correctly on all sides
fix: 调整通知中心宽度计算方式
将硬编码的宽度值改为使用 NotifyStyle.contentItem.width 以确保样式一致性
在 NotifyCenter 中添加了正确的滚动条宽度计算以考虑滚动条的存在
更新了主窗口宽度计算以包含正确的内边距处理
修复了锚点边距和右侧约束以确保动态宽度下的正确布局
添加了 contentPadding 属性以便更好地维护间距值
Log: 修复了通知中心动态宽度计算导致的布局问题
Influence:
1. 测试不同内容宽度下通知中心的显示效果
2. 验证滚动条正确显示且不会导致布局问题
3. 检查所有通知项是否保持一致的宽度
4. 测试窗口调整大小行为和内容对齐
5. 验证边距和内边距在所有边上是否正确应用
PMS: BUG-3258711 parent c691532 commit 8fb0eb7
4 files changed
Lines changed: 16 additions & 10 deletions
File tree
- panels/notification
- center
- package
- plugin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | | - | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | | - | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
0 commit comments