Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Adjust font size using Control key with Mouse Scroll Wheel. #3737

Merged

Conversation

russlescai
Copy link
Contributor

Following from previous PR, to allow merging.

This Pull Request adjusts the font size when the control key is held down and scroll wheel is used.

It ignores OSX(darwin) as this platform has a conflicting accessibility feature which should not be overwritten.

editor.setScrollLeft(previousScrollLeft - Math.round(wheelDeltaX * @scrollSensitivity))
event.preventDefault() unless previousScrollLeft is editor.getScrollLeft()

if event.ctrlKey and (process.platform isnt 'darwin')
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind moving this to the top of this function, under line 592, and returning early after event.preventDefault() is called?

That way it minimizes the diff even further.

@russlescai
Copy link
Contributor Author

Thanks @kevinsawicki I've updated as per your comments to simplify the diff even further.

@kevinsawicki
Copy link
Contributor

Thanks for this, sorry for the delay in merging it.

kevinsawicki added a commit that referenced this pull request Oct 15, 2014
…-fixes

Adjust font size using Control key with Mouse Scroll Wheel.
@kevinsawicki kevinsawicki merged commit 5c3a7a9 into atom:master Oct 15, 2014
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.

2 participants