Skip to content

fix(typography): use monospace for dynamic numeric values - #3161

Closed
0xdeafbeef wants to merge 1 commit into
AvengeMedia:masterfrom
0xdeafbeef:0xdeafbeef/push-vovnyopsruyn
Closed

fix(typography): use monospace for dynamic numeric values#3161
0xdeafbeef wants to merge 1 commit into
AvengeMedia:masterfrom
0xdeafbeef:0xdeafbeef/push-vovnyopsruyn

Conversation

@0xdeafbeef

Copy link
Copy Markdown
Contributor

Description

The CPU temperature kept changing width and making the bar jump around, which was pretty distracting.
This switches dynamic numbers in DankBar to the configured monospace font so the layout stays stable.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Related issues

None.

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • QML changes: ran make lint-qml with no new warnings

@bbedward

Copy link
Copy Markdown
Collaborator

We dont like this approach as much because it makes the fonts inconsistent, the intended behavior that may not be working correctly is to use TextMetrics to basically keep a minimum width for the largest possible value, that way the text changes but the overall widget size stays the same

@0xdeafbeef

Copy link
Copy Markdown
Contributor Author

@bbedward

non-mono mono

TextMetrics keeps the widget’s outer width stable, but the proportional digits still visibly shift within that fixed space.

Mono keeps both the widget width and the digit positions stable :)

BTW

Qt supports font.features: { "tnum": 1 }, and the bundled Inter font has tabular numerals, so that might make both of us happy :) We can keep the intended font consistent while preventing the digits from visually jumping around.

Should i open an issue? I can make a pr latter

@0xdeafbeef

Copy link
Copy Markdown
Contributor Author

@bbedward thank you :)

@0xdeafbeef 0xdeafbeef closed this Aug 24, 2026
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.

2 participants