Alternative mouse shortcuts support#1
Open
gryzly123 wants to merge 1 commit into
Open
Conversation
Adds right and middle click detection in Mission Control. The action to perform is customizable using a picker in Settings view. This commit also does some minor refactors: * window actions are now grouped in an enum, and both mouse, keyboard and overlay handler functions use the same method for all windows and actions (instigator is passed as a parameter to that method only for logging purposes) * since Theme is no longer the only picker in the Settings view, a SettingPickerRow class has been introduced * SettingPickerRow and SettingToggleRow now receive color as LinearGradient rather than raw Color - required for rainbow icon. Additional helper builder function has been added to convert colors to linear gradients. * fixes bug where the hardcoded width of the overlay was small enough so that the 4th overlay button could never be clicked. The width is now always calculated dynamically
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.
Hey, first of all, thanks for the great app, it works really well 😄 I thought it would be cool if it could also support managing windows without the need to use the overlay - simply hover and middle click to close a window - so I added it. I will note that I'm very new to both Swift and macOS itself, so hopefully I didn't make too many mistakes - would love to hear your comments.
Adds right and middle click detection inside Mission Control. The action to be performed is customizable using a picker in Settings view. Both click actions are set to None by default and must be manually enabled by the user.
OpenMissionControlCore refactors:
WindowActionenumperformWindowActionhas been renamed toperformWindowOSActionperformWindowActionhas been added to have a single code path for all possible actions - it is used by both mouse, keyboard and overlay handler functions - removes some redundancyInstigatorenum has been added and is passed toperformWindowActionin order not to break current debug logging functionality - we can still track who (overlay, keyboard, mouse click) requested the window action despite printing being kept solely withinperformWindowActionSettingsView refactors:
SettingPickerRowclass has been introduced - similar to the existingSettingToggleRowSettingPickerRowandSettingToggleRownow receive color asLinearGradientrather than rawColor- required to retain the rainbow icon in Theme withinSettingPickerRow. Additional helper builder functionsolidColorhas been added to convert colors to linear gradients