feat: Add numerical input and arrow key support for sliders#1860
Open
karanshah229 wants to merge 3 commits into
Open
feat: Add numerical input and arrow key support for sliders#1860karanshah229 wants to merge 3 commits into
karanshah229 wants to merge 3 commits into
Conversation
- Converted menu bar percentage labels into editable text fields. - Implemented `NSTextFieldDelegate` to handle manual typing with bound clamping (0-100). - Handled invalid string parsing with graceful fallbacks to the current slider state. - Added a native rounded bezel effect when the field is actively focused. - Overrode `control(_:textView:doCommandBy:)` to capture Up/Down arrow presses for live value manipulation. - Added a `Shift` modifier for arrow keys to toggle between 1% and 10% step increments. - Ensured all manual inputs immediately sync physical hardware brightness, volume, and contrast via DDC.
Member
Author
|
Hey @waydabber, thanks for taking out the time to review the PR and give feedback. I have addressed all the mentioned issues. Can you re-review the PR ? |
Member
|
Note: As AI generated PRs are getting more numerous now, I made decision that I won't review AI generated PRs/forks due to lack of time and resources. Of course other maintainers can help with this. I will not close such PRs however, but add a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR addresses user feedback regarding the difficulty of hitting exact values (e.g., exactly 43% or 87%) through the menu bar sliders via mouse drag.
Changes proposed in this pull request:
NSTextFieldelements.isBezeled = true.roundedBezelstyle so the user clearly understands they can type.control(_:textView:doCommandBy:)to capture continuousUp/Downarrow inputs when the field is actively focused.1%.Shiftincrements/decrements by10%.0%and100%.self.valueChanged(slider:), resulting in fluid DDC brightness/volume ramps without needing to press Enter.