GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
fix: align_text_y drops its hardcoded -2px nudge — true vertical centering
Co-Authored-By: Claude Fable 5 <[email protected]>
src/layout.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/layout.rs b/src/layout.rs
index 6ab1acf..c60d2b4 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -348,7 +348,7 @@ pub fn center_text_y(y: f32, container_h: f32, font_size: f32) -> f32 {
/// Standardized vertical text alignment calculation based on Spinbox widget alignment.
pub fn align_text_y(y: f32, height: f32, font_size: f32, top_offset: f32) -> f32 {
- y + top_offset + (height - top_offset - font_size) / 2.0 - 2.0
+ y + top_offset + (height - top_offset - font_size) / 2.0
}
pub fn reload_config() {