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

Individual zoom setting based on display ID #3208

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

babaric-dev
Copy link

@babaric-dev babaric-dev commented Jan 23, 2023

This PR kind of solves #3119.

Originally, every zoom change made is stored in the KEY_FONTSIZE key in SharedPreferences.

In this PR, it uses the display ID as a key to store the setting. The key is KEY_FONTSIZE + display number in string representation. The only exception is for the primary display (Display.DEFAULT_DISPLAY), which uses KEY_FONTSIZE.

Suppose Display.DEFAULT_DISPLAY is 0 and KEY_FONTSIZE is "fontsize" Here are some examples:

Display ID Key
0 "fontsize" (no change)
2 "fontsize2"
7 "fontsize7"
... ...

I tested the code. It works even during runtime switches between phone / DeX.

@babaric-dev
Copy link
Author

Will this merge?

@agnostic-apollo
Copy link
Member

Yes, looks fine, will test myself later.

@ghost

This comment was marked as spam.

@babaric-dev
Copy link
Author

@agnostic-apollo Could you please review and approve my PR?

@agnostic-apollo
Copy link
Member

Like I said in the other pull that preferences files have been moved, so you will have to wait till I push my local changes.

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.

None yet

2 participants