Skip to content

[UI/Fix] Set zoom limits along with zoom level instead of zoom factor #3325

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

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Dec 16, 2023

This PR fixes #3324 and fixes #2156

Looks like in some cases, the zoom factor set with the accessibility settings was getting reset when the windows size changed.

I could not reproduce it during development but I was able to reproduce it using the Flatpak container (both on my linux desktop and on the steam deck). Set a zoom of 80%, move to another screen, and resize the window.

This PR uses the zoomLevel instead of zoomFactor and also sets the visual level limit to 1 and that seems to work correctly (tested both during development and with the generated flatpak).


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:testing This PR is in testing, don't merge. label Dec 16, 2023
@arielj arielj changed the title Set zoom limits along with zoom factor [UI/Fix] Set zoom limits along with zoom factor Dec 16, 2023
@arielj arielj changed the title [UI/Fix] Set zoom limits along with zoom factor [UI/Fix] Set zoom limits along with zoom level instead of zoom factor Dec 16, 2023
@arielj arielj added pr:ready-for-review Feature-complete, ready for the grind! :P and removed pr:testing This PR is in testing, don't merge. labels Dec 16, 2023
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team December 16, 2023 18:42
} else {
return zoomFactor
return (zoomFactor - 1) / 0.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of setting a zoom factor (like 1.2, 1.4, 0.8, etc), setZoomLevel expects an integer with increments of 0.2 zoom

so a zoom of 80% is 0.8 zoom factor so it's -1 for zoom level
120% is 1.2 zoom factor so it's 1 zoom level

Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgm

@arielj arielj merged commit 91c455c into main Dec 19, 2023
@arielj arielj deleted the zoom-level-limit branch December 19, 2023 00:45
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
2 participants