QBZ-I18N WAS NOT FRONTEND-AGNOSTIC, whatever its own header said. No slint or tauri entry in its Cargo.toml — and eight `include_str!` reaching into `crates/qbz-ui/translations/`. Deleting the Slint crate, which is planned before the Qt release, would have failed to compile `qbz-i18n` and with it `qbz-qt`, i.e. the entire app, over a data directory nobody read as a dependency. The extraction that created this crate took the code and left the data behind. The eight .po files move to `crates/qbz-i18n/translations/` (git tracks them as renames, so history follows) and the includes become `../translations/`. `qbz-ui/build.rs` borrows them back through `../qbz-i18n/translations` for as long as that tree exists — the direction of the dependency is what matters, and it now points the way the deletion needs. MACOS: THE IMMERSIVE BAND GOES BELOW THE TRAFFIC LIGHTS, not beside them. It was inset to their right with the shell HeaderBar's rule, which is right for the shell — the lights sit at the head of a full toolbar row there — and wrong here, where the row is three floating glass pills over artwork and a 44px pill parked against the lights reads as debris. Vertical clearance comes from `SafeArea.margins.top`, the same question the left inset asks in the other axis: with ExpandedClientAreaHint the client area covers the titlebar region and SafeArea reports how much of it is unsafe, with a 28px floor for a 0 reading. The band keeps `leftMargin: 24` on every platform, which puts the trigger's leading edge in the same 20-24 band the lights start in, and the 16px gap under them is the band's own margin reused rather than a new number. The view trigger matches the cluster's width on macOS (SafeArea left margin, 78 floor): stacked, a 44px pill under a ~78px cluster reads as misaligned even with the left edges lined up. Its radius becomes height/2 rather than a constant 18, or the widened pill would have been a rounded rectangle beside three circles. Every other platform keeps the natural 44px, and the glyph was already centred so it needed nothing. The menu opens downward from a band that now has more room under it, so the flyout has more clearance than before rather than less. Built and smoked on Linux (gate green) and built on the Mac mini M2 (3m32s, no errors). The macOS geometry itself needs eyes on a Mac. cc
23 lines
1.4 KiB
Rust
23 lines
1.4 KiB
Rust
//! Compiles the Slint UI tree with bundled translations. `ui/app.slint` is the
|
|
//! single entry point. Translations are bundled (pure-Rust, no C dep) from
|
|
//! `<lang>/LC_MESSAGES/qbz-ui.po`; msgid = English source, no context.
|
|
//!
|
|
//! THE CATALOGUES MOVED OUT of this crate and are now BORROWED. They belong to
|
|
//! `qbz-i18n`, which embeds them with `include_str!` and is the crate every
|
|
//! frontend uses — it declared itself "frontend-agnostic" while reaching into
|
|
//! this directory for its data, so deleting this crate (planned before the Qt
|
|
//! release) would have broken the Qt app over a path nobody read as a
|
|
//! dependency. This borrow is the temporary half: it dies with the crate.
|
|
fn main() {
|
|
// SLINT_SCALE_FACTOR is a RUNTIME preference in this app (main.rs sets it
|
|
// from the persisted interface-size preset). If it leaks into the BUILD
|
|
// environment, the slint compiler const-propagates the factor and the
|
|
// runtime override becomes a permanent no-op — strip it unconditionally.
|
|
std::env::remove_var("SLINT_SCALE_FACTOR");
|
|
let config = slint_build::CompilerConfiguration::new()
|
|
.with_bundled_translations("../qbz-i18n/translations")
|
|
.with_default_translation_context(slint_build::DefaultTranslationContext::None);
|
|
slint_build::compile_with_config("ui/app.slint", config)
|
|
.expect("Slint UI failed to compile");
|
|
}
|