refactor: rewrite sidebar layout with two-pass architecture
Replace fragile Dummy()-based cursor flow with a deterministic two-pass layout system: - Pass 1: compute exact Y positions for all elements (pure math) - Pass 2: render at computed positions using SetCursorScreenPos + draw list Eliminates the dual-coordinate mismatch that caused persistent centering and overflow bugs. Height is computed once, not estimated then measured. Also tune sidebar spacing via ui.toml: - button-spacing: 4 → 6 - section-gap: 4 → 8 - Add section-label-pad-bottom (4px) below category labels - bottom-padding: 0 → 4
This commit is contained in:
@@ -1230,8 +1230,9 @@ width = { size = 140.0 }
|
||||
collapsed-width = { size = 64.0 }
|
||||
collapse-anim-speed = { size = 10.0 }
|
||||
auto-collapse-threshold = { size = 800.0 }
|
||||
section-gap = { size = 4.0 }
|
||||
section-gap = { size = 8.0 }
|
||||
section-label-pad-left = { size = 16.0 }
|
||||
section-label-pad-bottom = { size = 4.0 }
|
||||
item-height = { size = 36.0 }
|
||||
item-pad-x = { size = 8.0 }
|
||||
min-height = { size = 360.0 }
|
||||
@@ -1248,8 +1249,8 @@ icon-half-size = { size = 7.0 }
|
||||
icon-label-gap = { size = 8.0 }
|
||||
badge-radius-dot = { size = 4.0 }
|
||||
badge-radius-number = { size = 8.0 }
|
||||
button-spacing = { size = 4.0 }
|
||||
bottom-padding = { size = 0.0 }
|
||||
button-spacing = { size = 6.0 }
|
||||
bottom-padding = { size = 4.0 }
|
||||
exit-icon-gap = { size = 4.0 }
|
||||
cutout-shadow-alpha = { size = 55 }
|
||||
cutout-highlight-alpha = { size = 8 }
|
||||
|
||||
Reference in New Issue
Block a user