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 commented Apr 21, 2021

Before this change:
stationlistbefore
After this change:
stationlistafter

@PeterN
Copy link
Member Author

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 Compare April 21, 2021 21:02
@PeterN PeterN changed the title Codechange: Scale rating minigraphs on station window list. Fix: Scale rating minigraphs on station window list. Apr 22, 2021
@LordAro LordAro added the backport requested This PR should be backport to current release (RC / stable) label Apr 22, 2021
@PeterN PeterN merged commit 9fa38f5 into OpenTTD:master Apr 22, 2021
@PeterN PeterN deleted the station-rating-window-scale branch April 22, 2021 15:42
LordAro pushed a commit to LordAro/OpenTTD that referenced this pull request 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 pushed a commit to LordAro/OpenTTD that referenced this pull request 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 pushed a commit to LordAro/OpenTTD that referenced this pull request 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 pushed a commit to LordAro/OpenTTD that referenced this pull request 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 pushed a commit that referenced this pull request 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.
@LordAro LordAro added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants