-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
The theme editor preview is tiny on hiDPI displays #25585
Comments
I can't repro this on my Window 10 godot.windows.tools.32.exe build. Is there any other step that you might have missed? |
HiDPI issue. I can confirm this, theme editor is not scaled with the editor UI. Can be reproduced on not retina display by setting |
@bruvzg Setting DPI scale to 200% for me, makes everything else oversized too. The theme editor still maintained a readable font size for me. |
It's readable on normal display, on the MacBook Pro (15'' display with 2880×1800 resolution) this text should be about 1.2 mm in height. |
This is expected bahaviour. The dpi scale is determined by different theme sizing values(bigger mergins, bigger font...) So it is the theme itself which just is small ;) smaller font, margins, borders, textures. What would neet to happen is thst themes handle dpi themselves so the theme editor can have a slider to choose the dpi scale for the theme which is opened in the theme editor. This is planned to get added in the GSoC this year. |
bump I am working not he theme based dpi property which makes it much easier to understand and fix what is happening. |
Any updates @toger5 |
It was actually decided against the fix I implemented. Because The changes necassary were to low lvl and it was undesired to have such changes for a not that important feature like themes. |
I don't know how this could be fixed or worked around for now. We could scale the preview based on the editor scale, but this would likely require having a separate Viewport just for the preview (with its own stretch setting). Maybe it'd be sufficient to scale one of the Controls that displays the theme view? I'm not sure how well this would work due to containers though. |
Just in case you haven't, you should try restarting after each setting change. |
I'm also seeing this on the version of Godot that runs in the browser : https://godotengine.org/article/godot-editor-running-web-browser Viewing on my macbook pro the UI is super tiny. I think perhaps this may be related in terms of DPI settings ... |
I've played around with the DPI settings - it's not.
…On Sun, Jun 14, 2020 at 11:25 AM Andrew Wooldridge ***@***.***> wrote:
I'm also seeing this on the version of Godot that runs in the browser :
https://godotengine.org/article/godot-editor-running-web-browser
Viewing on my macbook pro the UI is super tiny. I think perhaps this may
be related in terms of DPI settings ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25585 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAVPLJJ7TSVBXGXSRYFC2DRWQRG7ANCNFSM4GUAYDSA>
.
|
I tried doing this on either the ScrollContainer or the root MarginContainer, but it doesn't work as Control scaling is not effective in containers (#7049). Any ideas for a workaround? Using a separate viewport is a possible solution, but that comes with its own issues (such as input handling). |
Just curious Hugo - you trying to do the fixes in C++ or GD Script?
…On Sun, Jun 14, 2020 at 11:17 PM Hugo Locurcio ***@***.***> wrote:
Maybe it'd be sufficient to scale one of the Controls that displays the
theme view? I'm not sure how well this would work due to containers though.
I tried doing this on either the ScrollContainer
<https://github.com/godotengine/godot/blob/79947dfef1db52462ce25f370696e3eb926fa627/editor/plugins/theme_editor_plugin.cpp#L630>
or the root MarginContainer
<https://github.com/godotengine/godot/blob/79947dfef1db52462ce25f370696e3eb926fa627/editor/plugins/theme_editor_plugin.cpp#L637>,
but it doesn't work as Control scaling is not effective in containers (
#7049 <#7049>).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25585 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAVPLIW42WYJNDZL4NWXZDRWTEX5ANCNFSM4GUAYDSA>
.
|
@knadoor I'm trying to fix it in the C++ code. While this might be fixable with a GDScript plugin, this should really be fixed at the core level. |
Aha! If it was C# I might be able to help...but C++, I'll leave it to the
experts ;)
…On Sun, Jun 14, 2020 at 11:31 PM Hugo Locurcio ***@***.***> wrote:
@knadoor <https://github.com/knadoor> I'm trying to fix it in the C++
code. While this might be fixable with a GDScript plugin, this should
really be fixed at the core level.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25585 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAVPLODGN4EBQGPJISN3D3RWTGKHANCNFSM4GUAYDSA>
.
|
This seems to be fixed in the latest master, but still a problem in release 3.2.3. I guess it should be moved to the 3.2 milestone? |
So for the time being there’s no fix? |
There is no fix yet, but as a workaround, you can force Godot to run in low-DPI mode or switch to a lower display resolution. There's the |
As a workaround is it possible to add a zoom functionality to the theme editor preview (with vertical and horizontal scrollbars) like the 2D or 3D preview? Doing so you can avoid to work with dpi settings or other stuff. |
Yes, but it's not trivial for the reasons described above. At this point, it'd be better to implement automatic scaling based on the editor scale setting.
There's already an editor scale setting you can query 🙂 |
@Calinou @YuriSizov @akien-mga A couple of ideas... Option 1: And this is how it looks like at default size: This option could be added in Interface -> Editor settings just below the "Main Font Size" option. Users have different monitor resolutions, so this is a setting where the onus can be put on the user to setup and not have to think about the small size of the theme font again. The font size of my source code is 17 - it actually looks the same size as the font size 25 I've set for the theme - so yeah it's kind of weird there and perhaps a better option is available - but this is a workaround. Option 2: So above I have the main font size at 14, and applying x2 to it is 28 - so this has been applied as the theme's default font size. I've tested this with a few font sizes, here's another example where the main font size is 22 and the theme font size is 44: We can see that the font size (visually looking) in the theme editor matches with the rest of the godot UI text now. This is something that would be a scaling set internally as part of core - so the default theme font size property will still be empty by default if the user hasn't set any value yet. |
@knadoor This is not about the font size. It's related to the scale which is used for everything related to sizes and spacing. You are viewing how the theme looks at its native scale. Unlike the editor theme, which incorporates your screen's DPI into its scale factor. |
Okay good point |
In 4.0, there's already a project setting you can adjust to modify the default theme's scale factor. (This affects all elements in the theme, not just the font size.) This is intended to be used when you want the UI to be large enough when using a high base resolution for your project (such as 4K). This means you cannot use this in every project, as the default base resolution is too low for accomodate for a default project theme that uses a scale of |
Oh fantastic, thanks for mentioning this!! |
Godot version:
v3.1.beta3.official
OS/device including version:
Model Name: MacBook Pro
Model Identifier: MacBookPro14,3
Processor Name: Intel Core i7
Processor Speed: 3.1 GHz
10.14.3
Issue description:
Was going to create a new theme.
Went to the control node, chose theme, created new theme, clicked "open editor"
The edit theme editor opened in the middle bottom.
Expected:
Editor should open with fonts the same size as the rest of the UI of the Godot engine.
Actual:
The UI fonts are tiny. See screenshot.
The text was updated successfully, but these errors were encountered: