-
Notifications
You must be signed in to change notification settings - Fork 214
Add scroll wheel support for font size adjustment #56
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
base: main
Are you sure you want to change the base?
Conversation
chtnnh
left a comment
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.
have tested the functionality, works great!
minor comments, when you resolve these, this pr is good to merge
freewrite/ContentView.swift
Outdated
| NSHapticFeedbackManager.defaultPerformer.perform(.generic, performanceTime: .now) | ||
| let direction = -scrollBuffer > 0 ? 2 : -2 | ||
| let newSize = fontSize + CGFloat(direction) | ||
| fontSize = min(max(newSize, 12), 32) // Limit font size between 12 and 32 |
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.
limit the font size between 16 and 26 (that's the limit in the original app)
freewrite.xcodeproj/project.pbxproj
Outdated
| CURRENT_PROJECT_VERSION = 1; | ||
| DEVELOPMENT_ASSET_PATHS = "\"freewrite/Preview Content\""; | ||
| DEVELOPMENT_TEAM = 2UDAY4J48G; | ||
| DEVELOPMENT_TEAM = 4YS2543B33; |
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.
don't commit this, this will affect development for all contributors
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.
@farzaa check this out!
|
changed to the development team to as it was and changer the limit (16 - 26) |
chtnnh
left a comment
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.
lgtm
cc: @farzaa
I have added the scroll functionality to the font size, now you can hover and swipe with 2 fingers to change the font size.
I am new to xcode or swift development so pardon me if the development team line wasn't to be changed as it was the only way to run freewrite locally.