-
Notifications
You must be signed in to change notification settings - Fork 197
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
Use Ctrl+Mouse wheel to increase / decrease the editor font size #328
Conversation
ReText/editor.py
Outdated
@@ -401,6 +401,23 @@ def updateTextStatistics(self): | |||
wordCount += 1 | |||
self.statistics = (wordCount, alphaNumCount, characterCount) | |||
|
|||
def wheelEvent(self, e: QWheelEvent): |
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.
This requires Python 3.5, but the README says that ReText works with 3.2 or higher. Please update the README or remove this.
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.
Sorry bout that, I'm used to typed languages :/
ReText/editor.py
Outdated
if (scroll > 0): | ||
size = size+1 | ||
elif (scroll < 0): | ||
size = size-1 |
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.
size += 1
/ size -= 1
would be a bit cleaner.
Also no parentheses are needed around scroll > 0
/ scroll < 0
in Python (unlike C-like languages).
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.
Yep, habits from other languages :/
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.
Pyflakes tells me that wheelEvent
for ReTextEdit is already defined on line 146. Please update that method instead of creating new one.
Sorry for not noticing it last time…
Upd: I have added pyflakes to Travis so it will be easier to notice such issues next time.
Merci! |
Anytime ;) |
Fixes #244