Skip to content

Increase width of bandwidth and frequency indicators - #543

Open
vjr wants to merge 1 commit into
mainfrom
vishal/indicator-widths
Open

Increase width of bandwidth and frequency indicators#543
vjr wants to merge 1 commit into
mainfrom
vishal/indicator-widths

Conversation

@vjr

@vjr vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member

Avoid indicator positions shifting when displaying different values.

Avoid indicator positions shifting when displaying different values.
@vjr vjr self-assigned this Aug 25, 2026
@vjr
vjr requested review from a team and stsdc August 25, 2026 03:37
@vjr vjr mentioned this pull request Aug 25, 2026
@vjr
vjr requested a review from danirabbit August 25, 2026 03:50

@danirabbit danirabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of doing this we should use tabular numbers. There's a built-in style class for it in Granite https://github.com/elementary/granite/blob/c4f258db9b6028c8b793f01d2f8248800726ce0a/lib/Constants.vala#L269

@vjr

vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Instead of doing this we should use tabular numbers. There's a built-in style class for it in Granite https://github.com/elementary/granite/blob/c4f258db9b6028c8b793f01d2f8248800726ce0a/lib/Constants.vala#L269

I'm unable to get this working. Seems to need to set width_chars (and maybe even max_width_chars) on the labels regardless.

I've done the following in my local changes:

  • Added dependency('granite-9', version: '>=9.0.0') to meson.build files.
  • Called Granite.init (); in the Indicator.vala construct block.
  • Called label.add_css_class (Granite.CssClass.NUMERIC); in the base IndicatorWidget.vala class.

The labels still resize depending on the unit text length like "bytes" or "MB" and the numbers don't seem to appear monospace, what am I missing? Halp!

@vjr
vjr requested a review from danirabbit August 25, 2026 06:30
@vjr

vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

I wonder if it's just OS9 being OS9 (something missing in the daily build) at the moment? Let me try real quick on my OS8 daily installation.

@vjr

vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

I wonder if it's just OS9 being OS9 (something missing in the daily build) at the moment? Let me try real quick on my OS8 daily installation.

Ah nevermind, it needs OS9 wingpanel-9 lib, so my status is still: Halp!

@stsdc

stsdc commented Aug 25, 2026

Copy link
Copy Markdown
Member

@vjr search for tabular number in the codevase. I think I've used them in the statusbar widget.

@danirabbit

Copy link
Copy Markdown
Member

You don't need to use Granite 9 (and shouldn't yet!). This feature is available since Granite 7.7.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants