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

Checkboxes are too small in 4K/UHD #13665

Closed
sirrobzeroone opened this issue Jul 16, 2023 · 5 comments · Fixed by #13666
Closed

Checkboxes are too small in 4K/UHD #13665

sirrobzeroone opened this issue Jul 16, 2023 · 5 comments · Fixed by #13666
Labels
Bug Issues that were confirmed to be a bug Formspec Upstream issue This bug is the fault of a library, the OS or an external service we use.

Comments

@sirrobzeroone
Copy link

sirrobzeroone commented Jul 16, 2023

Minetest version

5.7 Stable

OS / Hardware

Operating system: Win10
Screen UHD: 3840x2160p
OS Forces scaling to 200% but I force set this to100% but ended up with tinier out of scale checkboxes

Summary

Affects both MT main menu and formspec. Checkboxes are rendered about 50% to small when using UHD res - assuming standard of checkboxs should be about the same hieght as text.

Steps to reproduce

Open MT on a UHD device on Win10, Creative mode, Enable Damage, Host server appear small:

Edit: Thought a more actual size image could help illustrate:
tiny_cb_main_menu_more actual size
tiny_cb_main_menu

Add Checkbox as formspec elment and they are likewise smaller than expected:
tiny_cb_formspec

@sirrobzeroone sirrobzeroone added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jul 16, 2023
@sfan5 sfan5 added the Formspec label Jul 16, 2023
@SmallJoker
Copy link
Member

This is an issue in upstream Irrlicht as well: https://sourceforge.net/p/irrlicht/code/HEAD/tree/trunk/source/Irrlicht/CGUICheckBox.cpp#l149

This should either be fixed in upstream Irrlicht or in IrrlichtMt:

https://github.com/minetest/irrlicht/blob/b249e4523d9e0b8d7e607131685de34d8c48cd6b/source/Irrlicht/CGUICheckBox.cpp#L147

@SmallJoker SmallJoker added the Upstream issue This bug is the fault of a library, the OS or an external service we use. label Jul 16, 2023
@sfan5
Copy link
Member

sfan5 commented Jul 16, 2023

Easy reproducer:
./bin/minetest --config <(echo gui_scaling=0.5)

@sfan5 sfan5 added Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Jul 16, 2023
@SmallJoker
Copy link
Member

Correction. This is fixable in Minetest because Irrlicht skins can be created and modified:

#ifdef HAVE_TOUCHSCREENGUI
float density = RenderingEngine::getDisplayDensity();
skin->setSize(gui::EGDS_CHECK_BOX_WIDTH, (s32)(17.0f * density));

It should be easy to adapt this factor to make use of the display density for non-touchscreens as well.

@sfan5
Copy link
Member

sfan5 commented Jul 16, 2023

Manually adjusting some sizes looks like a hack to be honest, the GUI should be able to work with the sizes it is given.

@rubenwardy rubenwardy changed the title Checkbox's when displayed on UHD to small Formspec/Mainmenu Checkboxes are too small in 4K/UHD Jul 16, 2023
@rubenwardy
Copy link
Member

rubenwardy commented Jul 16, 2023

We maintain our own Irrlicht now, if the fix is better done in irrlichtmt it should be done there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug Formspec Upstream issue This bug is the fault of a library, the OS or an external service we use.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants