Skip to content
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

feat: Lock tool style #1119

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

Doublonmousse
Copy link
Collaborator

@Doublonmousse Doublonmousse commented Jun 11, 2024

Fixes #1104

As of now the lock option is added with a overlay popup that allows unlocking the current pen tool (pen or eraser).
What's left to do is

  • expose the option to lock/unlock tools somewhere in the UI.

I think it makes sense to add this in the Button Shortcuts portion of the settings with the added benefit of being able to change tools for pen/eraser there, and the dropdown (temporary/ ...) changed to a locked padlock/unlocked padlock toggle button

- the template has to be changed to accomodate the use of the buttons
- the buttons are not yet linked to the settings
- added to the gsettings
- shoud sync with the toggle

TODO
- sync the value with the actual lock value
- do the same for the pen modes
partial implementation of links between the pen choice and the settings button (only in that direction, the reverse still segfaults)
@Doublonmousse
Copy link
Collaborator Author

Well, I'm kinda stuck with a BorrowMut error for the (hopefully) very least part of code needed to have a functioning first prototype (with potentially some more bugs/cleanup to do, one of which is getting new icons).

plus a couple of bug fixes
@Doublonmousse Doublonmousse changed the title feat: Lock tool style (wip) feat: Lock tool style Jun 22, 2024
@Doublonmousse
Copy link
Collaborator Author

Doublonmousse commented Jun 22, 2024

This finally works. Probably nitpicks to be fixed

  • change_pen_eraser_style to be merged into an existing function using an optional argument
  • change_style_single_mode : same thing
  • change_style_pen_eraser_int : same thing
  • set_style_single_mode : same thing

Edit : done

@Doublonmousse Doublonmousse marked this pull request as ready for review June 22, 2024 18:42
@Doublonmousse Doublonmousse marked this pull request as draft June 22, 2024 18:49
@Doublonmousse Doublonmousse marked this pull request as ready for review June 22, 2024 18:52
@Doublonmousse Doublonmousse marked this pull request as draft July 12, 2024 19:12
@Doublonmousse
Copy link
Collaborator Author

Seems like I still have borrowmut errors on a fresh compile

@Doublonmousse
Copy link
Collaborator Author

Finally working

@Doublonmousse Doublonmousse marked this pull request as ready for review July 15, 2024 20:08
@Doublonmousse
Copy link
Collaborator Author

I'm thinking that maybe the logic has to be improved for touch inputs.

Currently, if I use the eraser part (locked to the eraser) on the screen then immediately use touch to change the tool, the lock will appear. So maybe I should just consider that such a press has to be considered as a pen input and switches to the pen mode ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to lock eraser button to the eraser
1 participant