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

feature: Let's start scaling when display tweaks is active #118

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

ceejbot
Copy link
Owner

@ceejbot ceejbot commented Jan 19, 2024

We now sneak a peek at the DisplayTweaks settings if we can find them, and adjust our sizes to account for any scaling or upscaling done behind Imgui's back.

If the window is downscaled, we include that in the layout's global scaling when flattening. If it's being upscaled afterward, we downscale twice to stay at a reasonable size. I do not think upscaling looks good, but at least everything is in the right place now.

Anchors specified via x & y coordinates are not affected by this scaling.

We commence by sneakily reading the display tweaks ini if it's
found, including the user custom ini. Next up: re-calcing
locations for anchor points using the scale.
Scale everything down if we're downscaling, and twice if
we're upscaling after the downscale. Hand-specified anchor
points are not affected by this scaling work, because we
assume people know what they're doing. (Possibly a bad
assumption.) An upscaled layout doesn't look good, but at
least it's now a good size and in the right place.
@ceejbot ceejbot merged commit 503f80b into latest Jan 19, 2024
1 check passed
@ceejbot ceejbot deleted the ceej/scaling branch January 19, 2024 22:48
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.

1 participant