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

Scale window & Save scale across sessions #453

Merged
merged 1 commit into from
Dec 7, 2015

Conversation

jakejarrett
Copy link
Member

sets scale of window with mod+shift + +/-/0

This will be useful for users on HiDPI screens

demo of scaling in action

@ghost
Copy link

ghost commented Dec 2, 2015

Why not Ctrl+-, Ctrl+0, Ctrl+=, which is used in most application (incl. browser)?

@weblancaster
Copy link
Member

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
@jakejarrett
Copy link
Member Author

@weblancaster updated the pull request with @wb9688's suggestion

@weblancaster
Copy link
Member

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.

here's the screenshot
screen shot 2015-12-04 at 11 39 24 am

};

userConfig.scaleWindow = function(scale){
Copy link
Member

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

Copy link
Member

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)

@weblancaster
Copy link
Member

I can merge and work on the fix if you'd prefer that.

@jakejarrett
Copy link
Member Author

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)

@weblancaster
Copy link
Member

Ok then, I'm merging into master and going improve the code.

weblancaster added a commit that referenced this pull request Dec 7, 2015
Scale window & Save scale across sessions
@weblancaster weblancaster merged commit 11f0ef6 into Soundnode:master Dec 7, 2015
weblancaster added a commit that referenced this pull request Dec 7, 2015
weblancaster added a commit that referenced this pull request Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants