Skip to content

fix(#278): header status label inflates natural width with long status strings#279

Merged
cachebag merged 1 commit intocachebag:masterfrom
pwsandoval:master
Mar 16, 2026
Merged

fix(#278): header status label inflates natural width with long status strings#279
cachebag merged 1 commit intocachebag:masterfrom
pwsandoval:master

Conversation

@pwsandoval
Copy link
Contributor

#278

Motivation

The header status label was inflating natural width with long strings, making compositor width behavior look ignored.

Description

This PR applies a surgical change in nmrs-gui/src/ui/mod.rs:

  • import pango::EllipsizeMode
  • set status.set_xalign(0.0)
  • set status.set_ellipsize(EllipsizeMode::End)
  • set status.set_max_width_chars(36)

No changes were made to networks.rs, wired_devices.rs, CSS, Stack/homogeneity, wrapping, or hard size requests/clamps.

Testing

  • cargo fmt --all
  • cargo test -p nmrs --all-features
  • cargo test -p nmrs-gui ⚠️ could not run in this environment due to missing system GTK/GLib development libraries (glib-2.0.pc not found via pkg-config).

AI disclosure

Per CONTRIBUTING.md, AI assistance was used to implement this small change and draft the PR description. I reviewed the diff and outputs before submission.

Copy link
Owner

@cachebag cachebag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Could you clean up your commit history? We don't usually merge in PRs with Merge commits in their history.

@cachebag cachebag added bug Something isn't working nmrs-gui Changes attribute to nmrs-gui labels Mar 14, 2026
@pwsandoval
Copy link
Contributor Author

I rebased and force-pushed. The merge commit was removed; history is now linear

Copy link
Owner

@cachebag cachebag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pwsandoval
Copy link
Contributor Author

The failing check is due to the workflow trying to force-push from a fork PR

@cachebag cachebag merged commit b5e52e9 into cachebag:master Mar 16, 2026
6 of 7 checks passed
@cachebag
Copy link
Owner

The failing check is due to the workflow trying to force-push from a fork PR

Yeah, this is an issue with a workflow I've been working on to auto-update nix hashes. All good.

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nmrs-gui Changes attribute to nmrs-gui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants