-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Discovery
I discovered this while testing nmrs-gui under a compositor width rule.
I set a window/layer width rule to 300px (example), but with long header status text, the UI behaved as if it needed much more space (visually close to ~532px natural width pressure), so the width constraint appeared ignored.
To make this explicit, I’m attaching two screenshots:
Test setup example: compositor layer/window width rule =
300.
- Before fix: compositor rule is 300px, but header/status natural width inflation makes the surface look much wider than intended.
- After fix: with ellipsize + max width chars, the same 300px rule is respected visually, and the layout stays constrained/vertical as expected.
Problem
The header status label can report an inflated natural width when status text is long, which makes compositor width constraints appear ignored.
Expected behavior
Long status text should not expand the header width; it should remain visually constrained.
Proposed fix
In nmrs-gui/src/ui/mod.rs (build_ui), configure the status Label to:
- align text to start (
set_xalign(0.0)) - ellipsize at end (
set_ellipsize(EllipsizeMode::End)) - limit natural width contribution (
set_max_width_chars(36))
Scope
Single-file, atomic change only in nmrs-gui/src/ui/mod.rs.
No changes to:
networks.rswired_devices.rs- CSS
- Stack/homogeneity
- wrapping / hard size clamps