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 some GUI scaling #7539

Merged
merged 4 commits into from Apr 24, 2019
Merged

Fix some GUI scaling #7539

merged 4 commits into from Apr 24, 2019

Conversation

@nielsmh
Copy link
Contributor

nielsmh commented Apr 23, 2019

Various GUI elements were not being scaled appropriately with UI scale set to 2x and 4x. Especially newspapers and query boxes were too narrow.

This also scales up the news ticker scroll speed by UI scale, as it otherwise goes by too slow to clear the screen.

Zooming the title game by GUI scale should also avoid most problems like the following, 1.9 title game in 3840 pixel wide showing far more than planned for:
image

@nielsmh

This comment has been minimized.

Copy link
Contributor Author

nielsmh commented Apr 23, 2019

I'm not proud of how I did the title game zoom by UI scale, it's very much a hack. It also does not update the zoom when changing UI scale in Options.

@nielsmh nielsmh force-pushed the nielsmh:uiscaling branch from eb8cab9 to 0990a14 Apr 23, 2019
@nielsmh

This comment has been minimized.

Copy link
Contributor Author

nielsmh commented Apr 23, 2019

Never mind the above comment, I found a better way to handle title game zoom.

@nielsmh

This comment has been minimized.

Copy link
Contributor Author

nielsmh commented Apr 23, 2019

Normal UI scale (with these patches applied, but looks the same without):
image

2x UI scale, without these fixes (taken with 1.9.1 and different config, hence different fonts):
image

2x UI scale, with fixes:
image

@nielsmh nielsmh merged commit 37daf43 into OpenTTD:master Apr 24, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20190423.8 succeeded
Details
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
Details
OpenTTD CI (Linux linux-amd64-clang-3.8) Linux linux-amd64-clang-3.8 succeeded
Details
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
Details
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
Details
OpenTTD CI (MacOS) MacOS succeeded
Details
OpenTTD CI (Windows Win32) Windows Win32 succeeded
Details
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Details
@nielsmh

This comment has been minimized.

Copy link
Contributor Author

nielsmh commented Apr 24, 2019

If a 1.9.2 happens I think this should be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.