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

GUI: Automatic scaling of checkboxes and scrollbars #13666

Merged
merged 1 commit into from Jul 17, 2023

Conversation

SmallJoker
Copy link
Member

Fixes #13665 by taking gui_scaling and the display density into account for checkboxes, scrollbars and Irrlicht window buttons (currently used in file picker).

I do not know why this code was limited to touchscreens but it does produce acceptable results on my 1080p screen with different GUI scaling factors.

To do

This PR is Ready for Review.

How to test

  1. minetest --config <(echo gui_scaling=0.5) (thanks sfan5)
  2. gui_scaling = 2
  3. Have a high-DPI screen

Mainly helpful on high-DPI screens or when 'gui_scaling' is changed
@sfan5
Copy link
Member

sfan5 commented Jul 16, 2023

Note: just as the code sets a replacement sprite for the checkbox, EGDI_CURSOR_UP and EGDI_CURSOR_DOWN would need some too, otherwise they are not scaled:
grafik

There are some general improvements that could be made here (e.g. not stubbornly rendering sprites at a fixed size) but since the GUI is supposed to be replaced anyway we might opt to not bother.

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@SmallJoker SmallJoker merged commit 128d22e into minetest:master Jul 17, 2023
13 checks passed
@sirrobzeroone
Copy link

I'll happily test this as well, just need to wait on one of the win builds to update - never did have much luck building myself on windows.

Wuzzy2 pushed a commit to Wuzzy2/minetest that referenced this pull request Jul 31, 2023
Mainly helpful on high-DPI screens or when 'gui_scaling' is changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkboxes are too small in 4K/UHD
3 participants