Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcode viewer: fix column width calculation #8294

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

buzzhuzz
Copy link
Contributor

@buzzhuzz buzzhuzz commented Feb 2, 2025

Description

Some locales have really long messages for line type statistics headers. Such a long messages causing strings overlapping with end result getting hard to read.

Rework column width calculation to take into account merged columns.
Correctly calculate header width as a bold font.

Screenshots/Recordings/Graphs

384124283-4258b0c6-08d6-4d13-9638-ba645bc6b1f8

Screenshot from 2025-02-03 03-30-38

For a locales with long enough "Used filament" localization,
line type table may render crooked with overlapping column headers.

This change reworks column width calculations getting rid of heuristics
based on the presence of "Display" column.
@buzzhuzz
Copy link
Contributor Author

buzzhuzz commented Feb 2, 2025

Those changes are split out of #7409

@yw4z
Copy link
Contributor

yw4z commented Feb 2, 2025

i assume this is not required if #8198 approved
my commit removes display text on header also changes "used filament" to "usage". im sure "usage" is muc more shorter on all languages. did you tested that commit?

@buzzhuzz
Copy link
Contributor Author

buzzhuzz commented Feb 2, 2025

I see. I'll check it using your change then.

This change is simply picked out of original PR.

@buzzhuzz
Copy link
Contributor Author

buzzhuzz commented Feb 3, 2025

@yw4z , with your changes issue is still there, but UX will not suffer much with "Usage" localization less than 14 characters.

For example, here are russian locale with longest "Usage" translation I know - "Использование".

Your PR:

Screenshot from 2025-02-03 05-00-55

Your PR with current one:

Screenshot from 2025-02-03 04-49-23

@yw4z
Copy link
Contributor

yw4z commented Feb 3, 2025

Thanks for reporting, yes this one still required. i thought that will be shorter. but it seems much shorter compared to "used filaments" in russian

@buzzhuzz
Copy link
Contributor Author

buzzhuzz commented Feb 3, 2025

I'm on LInux. And I forgot I have setting for the imgui scaling which is set to 0.8 and FreeType enabled.

Here are how your PR looks without any of my changes with russian localization:

Screenshot from 2025-02-03 06-06-50

@yw4z
Copy link
Contributor

yw4z commented Feb 3, 2025

Oh ok that looks normal now, still i have to fine tune colors for light appearance

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