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

Fractional scale and fixes #100

Merged

Conversation

GameParrot
Copy link
Contributor

  • scaling now correctly applies to keystrokes hud
  • added fractional scaling
  • fixed keystrokes with non default keys (requires restart)
  • moved fullscreen option to our own settings file
  • tweaked keystrokes color to improve visibility on white background

GameParrot and others added 3 commits July 12, 2024 15:10
- scaling now correctly applies to keystrokes hud
- added fractional scaling
- fixed keystrokes with non default keys (requires restart)
- moved fullscreen option to our own settings file
makes it visible on white background
@ChristopherHX
Copy link
Member

I never added fractional scaling because imgui truncates all sizes after a fractional scaling

https://github.com/ocornut/imgui/blob/126569ad5b3a2c5329cc8ee914dd5b2075f4dd50/imgui.cpp#L1298

So my call to this method will randomize imgui scaling, as long we don't reset all sizes on change and skip diving via old scale

@GameParrot
Copy link
Contributor Author

I never added fractional scaling because imgui truncates all sizes after a fractional scaling

https://github.com/ocornut/imgui/blob/126569ad5b3a2c5329cc8ee914dd5b2075f4dd50/imgui.cpp#L1298

So my call to this method will randomize imgui scaling, as long we don't reset all sizes on change and skip diving via old scale

fractional scale looks fine for me

@ChristopherHX
Copy link
Member

What happens if you flip 2-10 times between two or more fractional scales?

I predict that the border sizes will vary by 1-?? pixels compared to the sizes used after open and not going back to the sizes it used initially

@ChristopherHX
Copy link
Member

ChristopherHX commented Jul 23, 2024

this code get's run during switching scales lround(lround(17px / 100%* 125%) / 125% * 100%)

Now replace 125 and 100 by random scales, it is unlikely there is no loss in pixels

For integer scales is no loss in precision in that code

@ChristopherHX
Copy link
Member

I would probably fix this and get this merged, but this needs to be addressed

@ChristopherHX
Copy link
Member

I mean this bug:
image

vs. the correct one
image

@ChristopherHX ChristopherHX merged commit c248465 into minecraft-linux:master Jul 24, 2024
23 checks passed
@ChristopherHX
Copy link
Member

@GameParrot I don't see why you added 25%-75% scales, e.g. on ubuntu/windows scaling lower bounds are always 100%

I also switched the display format to percent to match the other UI scaleing settings

@ChristopherHX
Copy link
Member

Thanks for this change, your hud looks much better now when applying scaling

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