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

Control handles extremely small on mobile device #40910

Closed
tavurth opened this issue Jul 31, 2020 · 2 comments
Closed

Control handles extremely small on mobile device #40910

tavurth opened this issue Jul 31, 2020 · 2 comments

Comments

@tavurth
Copy link
Contributor

tavurth commented Jul 31, 2020

Godot version:
Screenshot 2020-07-31 at 15 07 14

OS/device including version:
Screenshot 2020-07-31 at 15 07 22

Android Nexus 6P (screen size 2560 x 1440)

Issue description:
Control handles are extremely small on my mobile device, which has a large resolution.

Display scaling with expand viewport doesn't help me much in this case as I would like to use the sensor of the device to rotate the controls without them appearing stretched or crushed.

Desktop screenshot
Screenshot 2020-07-31 at 15 04 47

Mobile screenshots

Notice the handle size of the SpinBox is still just a couple of pixels high.
Mobile landscape

As well as the HScrollBar has just a few pixels of width for the handle. On mobile this is impossible to grab, as the real screen size is less than 1mm.
Mobile profile

Steps to reproduce:
Take any mobile device with a high screen resolution
Controls handles will be unusably small.

Minimal reproduction project:
https://github.com/tavurth/godot-controlsize-bug

Perhaps there's a way to control the size of the handles?

@Calinou
Copy link
Member

Calinou commented Jul 31, 2020

Try using the 2d stretch mode and expand stretch aspect as described in the Multiple resolutions documentation.

If you use the disabled stretch mode, UI elements will be small as no scaling will be performed, regardless of the base resolution defined in the Project Settings. This is expected. Usually, you should only use the disabled stretch mode for desktop non-game applications.

You can increase the size of the SpinBox handles by creating a custom theme and replacing the updown icon in the SpinBox class with a larger version.

@tavurth
Copy link
Contributor Author

tavurth commented Jul 31, 2020

@Calinou I see, I'd previously tried that but it was giving me a weird stretching effect of my GUI controls.
I see now that it was because I'd anchored them rather than using a VBox or HBox.

Thank you for getting me to check it again! I'll close this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants