-
Notifications
You must be signed in to change notification settings - Fork 641
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
Scale window & Save scale across sessions #453
Conversation
d9b1fd6
to
35ccd8a
Compare
Why not |
I agree with @wb9688 can we change the keyboard shortcut @jakejarrett |
Sets scale of window with mod+shift + +/-/0 This will be useful for users on HiDPI screens
@weblancaster updated the pull request with @wb9688's suggestion |
Thanks @jakejarrett I did some tests and code review (comments added to the files change/commit) When I fresh start the App and press the shortcut keyboard to zoom-in this is what I get at first, then if I close the app and open again because we have saved the scale number on localStorage if I press the shortcut keyboard to zoom-in again works as expected. So I would suggest to define a scale right at the beginning. |
}; | ||
|
||
userConfig.scaleWindow = function(scale){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should define the currentScale and newScale vars at the top and then re-assign.
var currentScale;
var newScale;
then you can just do currentScale = whateverValueYouWant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we in a way remove the conditions here because you can perhaps just send the value number from the shortcuts method e.g scaleWindow(-0.1)
or scaleWindow(0.1)
I can merge and work on the fix if you'd prefer that. |
If you want to work on the fix @weblancaster that'd be dope 😄 I was having issues with the scaling up when just adding 0.1 to the zoom. (idk why) |
Ok then, I'm merging into master and going improve the code. |
Scale window & Save scale across sessions
sets scale of window with mod+shift + +/-/0
This will be useful for users on HiDPI screens
demo of scaling in action