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

Fix UI scaling weirdly #115

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

Kiisu-Master
Copy link
Contributor

I tried to fix the UI scaling in weird ways.
I am sure this is not the best way of fixing it, because I did some hacky things and didn't look into how it all actually works.
Sorry

Current problems with this fix:

  • The viewport is not scaling properly and jumps when moving the split. (Because the size gets rounded I think)
  • The window minimum size should probably be set somewhere else. (Not in the settings loading)
  • The code editor goes to minimum size when typing text in it and jumps back to full size when moving any splits (Maybe a Godot bug)

Screenshot of what it looks like:
image

@MewPurPur
Copy link
Owner

MewPurPur commented Oct 25, 2023

Thanks! I will look into this soon and provide feedback.

Before that, may I ask how you want to be credited in the author list? "Kiisu-Master" or "Real Name (Kiisu-Master)"?

@Kiisu-Master
Copy link
Contributor Author

Just Kiisu-Master, or Kiisu_Master which is my usual username which I couldn't use on github.

Also I found that the scaling was set like that for high res screens ( #4 ).
On my Laptop (with a low res screen) it made the whole UI pixelated/smooth and too big, so that's why I changed it.
Maybe there is a better way to support high res screens?

@Kiisu-Master
Copy link
Contributor Author

Maybe a user setting that changes get_window().content_scale_factor

@MewPurPur
Copy link
Owner

MewPurPur commented Oct 25, 2023

There are a lot of things that must be addressed after this, but I think it's the right path forward for now. A content_scale setting providing an enum would also be nice to have, but reeeaaally complex to implement I'd imagine. It would need to modify the theme resource and make all the little editors respond well to THEME_CHANGED notifications. Are you up to the task?

For now, please try to address the following issues:

  • Snapping lines aren't drawn over the resizing grabber.

image

  • zoom_reset() doesn't fit the image very well to frame when the viewport becomes bigger.

  • The checkerboard applied is too small when the viewport becomes large, so this should be taken into account too when passing it to the checkerboard shader.

  • Rounding issue would be nice to be fixed too, yeah.

  • The max inspector size needs to be toned down quite a bit, it's pretty ridiculous right now.

@Kiisu-Master Kiisu-Master marked this pull request as draft October 28, 2023 17:39
@MewPurPur
Copy link
Owner

MewPurPur commented Nov 5, 2023

May I request splitting off the horizontal grabber in another PR, so I can merge that enhancement separately first?

@Kiisu-Master
Copy link
Contributor Author

May I request splitting off the horizontal grabber in another PR, so I can merge that enhancement separately first?

Why do you want to merge that separately?
The split between inspector and viewport doesn't work properly yet because the viewport doesn't scale.
It's almost the only thing in this PR anyways.

@MewPurPur
Copy link
Owner

MewPurPur commented Nov 5, 2023

The ability to adjust the proportion between the inspector and display is separate from changing the stretch mode, both make sense on their own.

@MewPurPur
Copy link
Owner

MewPurPur commented Dec 21, 2023

I talked about this approach and why I can't accept a PR solely implementing it in #342. A solution to this is really needed, and one of the highest priorities, but it requires a more thorough PR.

Conflicts:
	project.godot
@MewPurPur MewPurPur marked this pull request as ready for review April 16, 2024 07:16
@MewPurPur MewPurPur merged commit 2f431da into MewPurPur:main Apr 16, 2024
@MewPurPur
Copy link
Owner

YOLO

@Kiisu-Master Kiisu-Master deleted the update_ui_layout branch April 16, 2024 17:40
MewPurPur pushed a commit that referenced this pull request Jun 1, 2024
MewPurPur pushed a commit that referenced this pull request Jun 1, 2024
MewPurPur pushed a commit that referenced this pull request Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants