Linux stylus buttons#207
Open
MaciejWieczor wants to merge 4 commits into
Open
Conversation
Now easytab on linux outputs info if stylus buttons were clicked or not
Author
|
This PR responds to this issue: #177 |
Owner
|
Hey Maciej, thanks for the PR. There are some changes that would make the code better. Here's some stuff I did in my local branch:
These are two things that I still intend to look at -
My plan is to finish those two items and then merge your PR. Will probably get back to it next week, so feel free to do the same changes yourself and I can merge them. If not, just wait and I will post here when I finish it |
5fe10ab to
6feb1a2
Compare
Added gui buttons and settings to keep information on what setting is chosen for both stylus buttons. Added logic to handle button events from the stylus based on the setting chosen in the gui radio buttons section.
6feb1a2 to
2c63384
Compare
Moved void function executing stylus button logic from sdl_milton.cc where it was a static util function, to milton.cc from where it is imported to sdl_milton through milton.h. Signed-off-by: Maciej Wieczór-Retman <maciej@maciej.localdomain>
Author
|
I had some time so I tried reformatting my changes. Hopefully they are going to be more helpful than problematic :b
On the two other things
|
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.
I added two entries in the settings menu to give stylus buttons some common functionalities. While being able to change the lower button bind to for example "switch to brush" it is still able to pan the canvas (this allows some function on the upper button and pan + return to brush on the lower one). All code running is inside #ifdef linux clauses as on windows stylus buttons functions are defined with the gui driver
All changes in the settings for the stylus are persistent. For now only functions that came to my mind were switch to brush and eraser and changing the size of the brush (as these are the ones I use the most probably)