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

Add DPI settings to allow for Object-based Display Scaling #6

Closed
swarnimarun opened this issue May 7, 2019 · 8 comments
Closed

Add DPI settings to allow for Object-based Display Scaling #6

swarnimarun opened this issue May 7, 2019 · 8 comments

Comments

@swarnimarun
Copy link

Display Scaling for changing the scale of Nodes

image

Here I changed the Display Scaling of Editor itself to show how well it works.

The Display Scaling is used by the Editor globally making it problematic for the Visual Scripting system to discretely use it.

I see a few simple ways of achieve the solution to this problem,

  • First, is to give all the UI Nodes a zoom/dpi/display_scale variable that holds zoom factor propagated by the Graph Edit Node. This will allow for Graph Nodes to have different Scaling.
  • Second, is to add the display_scale variable to the Theme which will allow for inheritance based Display Scaling. This is a more clean solution but can have bugs like opening windows from one context will open weirdly themed windows(probably can be fixed with some planning).

Even though this is mostly for Visual Scripting but adding display_scaling to UI Nodes can be useful for scaling of menus in the actual games.

@swarnimarun
Copy link
Author

cc: @fire @toger5

@toger5
Copy link

toger5 commented May 8, 2019

This is something i also have thought about. I currently have a working branch on my system with full dpi support. You can change any Theme to use and a dpi scale. This will scale the styleboxes and constants. (Also works for image based style boxes)
I really want to get the pr open. I have it on my pc for such a long time now...

Makes me want to finally open the pr.

@swarnimarun
Copy link
Author

@toger5 if you do open it let me know. I tried seeing your fork of Godot didn't find it. At least not all of it.
I can fake by using a display scale variable but not sure about what will the best approach be.

@fire
Copy link
Member

fire commented May 8, 2019

@toger5
Copy link

toger5 commented May 8, 2019

Yea that is actually it. just not up to date. Just found the code and made a temp commit. I will push it now but history will change so dont work on it ;)

@fire
Copy link
Member

fire commented May 8, 2019

@Calinou
Copy link
Member

Calinou commented Nov 17, 2021

godotengine/godot#52170 should address this in master once it's merged. Its 3.x counterpart was already merged in Godot 3.4: godotengine/godot#52137

@fire
Copy link
Member

fire commented Jan 6, 2022

Fixed by: godotengine/godot#52170

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

4 participants