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

Fix: Scale rating minigraphs on station window list. #9075

Merged
merged 1 commit into from Apr 22, 2021

Conversation

@PeterN
Copy link
Member

@PeterN PeterN commented Apr 21, 2021

Motivation / Problem

Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.

Description

Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
Magic scaling values have been simplified and logic is set to explicitly treat cargo waiting <= 30 as a small vertical chart.

Limitations

The pixel-doubling logic to make the rating bar more visible assumes the font size is increased by font zoom level, rather than by setting a larger font size.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
@PeterN
Copy link
Member Author

@PeterN PeterN commented Apr 21, 2021

Before this change:
stationlistbefore
After this change:
stationlistafter

@PeterN
Copy link
Member Author

@PeterN PeterN commented Apr 21, 2021

Totally forgot but this change also fixes the sizing/spacing of the transport type / cargo filter buttons at the top of the window.

src/station_gui.cpp Outdated Show resolved Hide resolved
src/station_gui.cpp Outdated Show resolved Hide resolved
Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
@PeterN PeterN force-pushed the station-rating-window-scale branch from 9c87b6a to df73354 Apr 21, 2021
@PeterN PeterN changed the title Codechange: Scale rating minigraphs on station window list. Fix: Scale rating minigraphs on station window list. Apr 22, 2021
@PeterN PeterN merged commit 9fa38f5 into OpenTTD:master Apr 22, 2021
13 checks passed
@PeterN PeterN deleted the station-rating-window-scale branch Apr 22, 2021
LordAro added a commit to LordAro/OpenTTD that referenced this issue May 1, 2021
…9075)

Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
LordAro added a commit to LordAro/OpenTTD that referenced this issue May 1, 2021
…9075)

Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
LordAro added a commit to LordAro/OpenTTD that referenced this issue May 2, 2021
…9075)

Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
LordAro added a commit to LordAro/OpenTTD that referenced this issue May 2, 2021
…9075)

Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
LordAro added a commit that referenced this issue May 3, 2021
Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants