Commit 9686398
fix: adjust list item height calculation for dynamic rows
Previously the list item height was fixed to 36px, redefined as
the macro `ListItemHeight`. This change removes the fixed height
and calculates the row height dynamically based on font metrics,
allowing the list to properly display items with multi-line content.
Additionally, the drawing rectangle for the item name now uses
`nameTextMaxWidth` instead of the actual text width, ensuring consistent
alignment. The web static text ellipsis handling is also fixed to
correctly subtract the marker width.
Log: Adjusted list item height for dynamic rows in grand search results
Influence:
1. Test single-line and multi-line item display in grand search results
list
2. Verify that row height adapts correctly for items with and without
second line
3. Check alignment of item name text when ellipsis is applied
4. Confirm web static text items show correct marker and ellipsis
behavior
5. Test under different font sizes and DPI settings
fix: 调整列表项行高为动态计算
之前列表项高度固定为 36px,定义为宏 `ListItemHeight`。此更改移除了固定高
度,基于字体度量动态计算行高,使列表能够正常显示多行内容。同时修改了名称
绘制矩形区域,使用 `nameTextMaxWidth` 确保对齐一致。修复了 web 静态文本
省略号处理中标记宽度的减法逻辑。
Log: 调整全局搜索结果列表行高为动态高度
Influence:
1. 测试全局搜索结果列表中单行和多行项目的显示效果
2. 验证有/无第二行时行高是否正确自适应
3. 检查名称文本省略时的对齐情况
4. 确认 web 静态文本项目标记和省略行为正确
5. 在不同字体大小和 DPI 设置下测试1 parent fa2bdb8 commit 9686398
1 file changed
Lines changed: 9 additions & 10 deletions
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 103 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
| |||
309 | 308 | | |
310 | 309 | | |
311 | 310 | | |
312 | | - | |
| 311 | + | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
350 | | - | |
| 349 | + | |
351 | 350 | | |
352 | 351 | | |
353 | 352 | | |
| |||
0 commit comments