status bar
git clone https://git.lucas.co/cce-status-interface.git
refactor: set vertical text through cce_ui::backend::text
cce-ui retired its two crate-root statics IS_VERTICAL / BAR_THICKNESS
for set_vertical_text(Option<thickness>) / vertical_text() beside the
text shaping that reads them. The bar sets the mode in rebuild_layout
and reads it back in is_vertical's tie-break, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 4177d9a..20e0135 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -489,7 +489,7 @@ impl StatusApp {
} else if self.width > self.height {
false
} else {
- cce_ui::IS_VERTICAL.load(std::sync::atomic::Ordering::Relaxed)
+ cce_ui::backend::text::vertical_text().is_some()
}
}
@@ -497,9 +497,8 @@ impl StatusApp {
fn rebuild_layout(&mut self) {
log::info!("[cce-status-interface] rebuild_layout module={:?} size={}x{}", self.selected_module_name, self.width, self.height);
let is_vertical = self.is_vertical();
- cce_ui::IS_VERTICAL.store(is_vertical, std::sync::atomic::Ordering::Relaxed);
let bar_thickness = read_status_height_from_config() as u32;
- cce_ui::BAR_THICKNESS.store(bar_thickness, std::sync::atomic::Ordering::Relaxed);
+ cce_ui::backend::text::set_vertical_text(is_vertical.then_some(bar_thickness));
// Family WITHOUT the embedded size: the toolkit's text pipeline lets
// a size inside the font string ("Chivo Mono 14") override the