git.lucas.co / cce-gallery
widget gallery and compositor test bench

commit19dfca0bd74d399bfed2cf5df6dd8a7b42931223
parent24328b9618
authorLucas Galante <[email protected]>
date2026-07-05 00:50
Fix status bar font rendering scale factor initialization bug

 src/main.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 38cad74..e80af6e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -255,6 +255,7 @@ impl State {
         border_width: f32,
         border_bevel: bool,
     ) -> Self {
+        cce_ui::scale::set_scale_factor(scale as f32);
         let lw = pw as f32 / scale as f32;
         let lh = ph as f32 / scale as f32;
         let sw = lw;
@@ -387,7 +388,9 @@ impl State {
         } else {
             make_text_buffer(&mut font_system, "Clear Test Interface - Controls", 16.0)
         };
-        let status_buffer = make_text_buffer(&mut font_system, "Select a test case to begin verification.", 12.0);
+        let (_, status_font_size) = cce_ui::layout::statusbar_font_parsed();
+        let status_size = if status_font_size > 0.0 { status_font_size } else { 12.0 };
+        let status_buffer = make_text_buffer(&mut font_system, "Select a test case to begin verification.", status_size);
 
         let widgets: Vec<Box<dyn Element>> = if is_child {
             let desc_label = match child_type.as_deref() {
@@ -624,7 +627,6 @@ cascades in cce."
             }
         }
 
-        cce_ui::scale::set_scale_factor(scale as f32);
         state.apply_layout();
         state.upload_vertices();
         state