Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Enable Zoom Options in Preferences #166

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

Conversation

nirmit
Copy link
Contributor

@nirmit nirmit commented Nov 12, 2017

This attempts to fix #59 by adding the option in preferences to change the zoom factor. The current available values are 80%, 100% (default), 125%, 150%, 175% and 200%.

Fixes #59

This attempts to fix nylas-mail-lives#59 by adding the option in preferences to change the zoom factor.  The current available values are 80%, 100% (default), 125%, 150%, 175% and 200%.

Fixes nylas-mail-lives#59
@dweremeichik
Copy link
Member

Oh, cool! How well does it work?

@nirmit
Copy link
Contributor Author

nirmit commented Nov 13, 2017

It works pretty well.

125%
125

150%
150

200%
200

@lamixer
Copy link

lamixer commented Nov 13, 2017 via email

The assignment of `zoomFactor` was not automatically initialized.  Added the same by forcing an initialization.
@dweremeichik
Copy link
Member

@nirmit is this one ready to merge, or do you still have some changes to make?

@nirmit
Copy link
Contributor Author

nirmit commented Nov 13, 2017

Ready to merge! Can someone test this on Linux/Windows? I don't have either. :(

@dweremeichik
Copy link
Member

I'm 👍 on this, I will give it a spin on Linux when I get a chance.

@mikeseese
Copy link
Contributor

im 👍 if @dweremeichik is

@dweremeichik
Copy link
Member

I'll merge after testing.

@dweremeichik
Copy link
Member

This breaks for me after opening up an email. (It resets to default).

@lamixer
Copy link

lamixer commented Nov 21, 2017 via email

@nirmit
Copy link
Contributor Author

nirmit commented Nov 21, 2017

Hmm... Once you set the zoom, can you check if the interfaceZoom value propagates to all the config files in ~/.nylas-mail. It seems that the old value lingers in one of the config files.

@mikeseese
Copy link
Contributor

mikeseese commented Dec 13, 2017

@nirmit do you have a status on this since the last comments? are you waiting on someone to test and provide feedback?

@nirmit
Copy link
Contributor Author

nirmit commented Dec 13, 2017

@seesemichaelj the issue is that not all versions of the config.json get the updated interfaceZoom values when the user changes the default. Can you help here in making this consistent across the various config.jsons being created?

If I change the zoom options, don't click on an email from the thread list, quit Nylas, and reopen, the interfaceZoom is updated and used. The client then displays everything with the desired zoom.

@mikeseese
Copy link
Contributor

mikeseese commented Dec 14, 2017

Well no where in your code does it look like the config is ever being changed? Unfortunately I don't really know how to add a parameter to be written to the config file

@nirmit
Copy link
Contributor Author

nirmit commented Dec 14, 2017 via email

@mikeseese
Copy link
Contributor

The config.json files are timestamped backups. so the one with the biggest number should be the most recent one, and the one that has your change. we always read from the most recent config file; so i wouldn't expect this to be a problem as i expect the 9 files to not have your thing as they're backed up versions of the config

@nirmit
Copy link
Contributor Author

nirmit commented Dec 14, 2017 via email

@mikeseese
Copy link
Contributor

mikeseese commented Dec 14, 2017

Ah ok. I think you need to listen to the NylasEnv.config.onDidChange event to get the change in the config. Looks like what you're reading is just the initial config variable. Probably a similar example for this would be

this._application.config.onDidChange('core.workspace.systemTray', ({newValue}) => {
if (newValue === false) {
this.destroyTray();
} else {
this.initTray();
}
});
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Zoom/Change Font Size
4 participants