Commit 1e26b98
committed
fix: prevent icon blur by rounding alignment positions
Fixed blurry icon rendering issue by applying std::round to center
alignment calculations. When calculating vertical and horizontal center
positions for icons, floating point arithmetic was causing sub-pixel
misalignment which resulted in blurry rendering. The change ensures
pixel-perfect alignment by rounding the calculated positions to nearest
integer values.
Log: Fixed blurry icon rendering when centered in containers
Influence:
1. Verify icons appear sharp when centered in containers
2. Test with various icon sizes and container dimensions
3. Check alignment in both horizontal and vertical directions
4. Verify no regression in other alignment modes (left/right/top/bottom)
fix: 修复图标模糊问题通过四舍五入对齐位置
通过使用std::round对居中对齐计算进行四舍五入处理,修复了图标渲染模糊的
问题。原先计算图标垂直和水平居中位置时,浮点运算会导致亚像素级的错位,从
而造成渲染模糊。此修改通过将计算位置四舍五入到最近的整数值,确保像素完美
对齐。
Log: 修复了图标在容器中居中时出现的模糊问题
Influence:
1. 验证图标在容器中居中时显示清晰
2. 测试不同图标尺寸和容器大小的情况
3. 检查水平和垂直方向的对齐效果
4. 验证其他对齐模式(左/右/上/下)没有出现回归问题
pms: BUG-2884271 parent 306320f commit 1e26b98
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
0 commit comments