Skip to content

logic changes for selection cancellation - #1139

Closed
Doublonmousse wants to merge 60 commits into
flxzt:mainfrom
Doublonmousse:no_spots
Closed

logic changes for selection cancellation#1139
Doublonmousse wants to merge 60 commits into
flxzt:mainfrom
Doublonmousse:no_spots

Conversation

@Doublonmousse

@Doublonmousse Doublonmousse commented Jul 11, 2024

Copy link
Copy Markdown
Collaborator

Fixes #414

  • This fixes the small dots that appears on selection cancellation with the pen (whilst allowing for strokes to still be written if they're larger than small dots)

A couple remarks :

  • shapes need an additional up/down cycle : we could change it to follow the same logic as the brush but this could also be done by not changing the logic of the shape part and only disallowing shapes to be too small (in that case we can create shapes that aren't even visible but are still part of the document)
  • the eraser and typewriter both need an additional pen up/down to activate
  • tools aren't affected (they won't change anything if they're activated on such a short pen down/up cycle)
  • This does not change behavior when a selection is deleted.

@Doublonmousse

Copy link
Copy Markdown
Collaborator Author

I've added a condition to only create shapes if they're large enough. As things like arrows would still appear on a single pen event, I'll leave the current behavior for shapes after a selection cancellation (that is we need an extra up/down cycle)

@Doublonmousse

Copy link
Copy Markdown
Collaborator Author

I've added the cancellation of the selection tool upon deleting a selection when the selection tool is temporary

@Doublonmousse
Doublonmousse marked this pull request as ready for review July 13, 2024 14:41
Comment thread crates/rnote-engine/src/pens/shaper.rs Outdated
fixes bug where large vertical or horizontal elements would get cancelled
Comment thread crates/rnote-ui/src/appwindow/actions.rs Outdated
Comment thread crates/rnote-engine/src/pens/brush.rs Outdated
Comment thread crates/rnote-engine/src/pens/selector/penevents.rs Outdated
Doublonmousse and others added 11 commits November 2, 2024 15:59
- move actions logic into `trash_selection`
- small rename of canceled* to have coherent naming between variables and functions getters/settesr
- move comment closer to the `canceled_state` variable (variable-level docstring)
- constant added as such
* Update translation files

Updated by "Update LINGUAS file" hook in Weblate.

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/

* Translated using Weblate (Hebrew)

Currently translated at 99.2% (547 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/he/

* Added translation using Weblate (English (Middle))

* Translated using Weblate (Finnish)

Currently translated at 93.6% (516 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/fi/

* Translated using Weblate (Portuguese)

Currently translated at 38.2% (211 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/pt/

* Translated using Weblate (Bengali)

Currently translated at 100.0% (551 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/bn/

* Translated using Weblate (Portuguese)

Currently translated at 46.2% (255 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/pt/

* Added translation using Weblate (Romanian)

* Translated using Weblate (Romanian)

Currently translated at 0.7% (4 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/ro/

* Translated using Weblate (Romanian)

Currently translated at 1.4% (8 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/ro/

* Translated using Weblate (Bengali)

Currently translated at 100.0% (551 of 551 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/bn/

---------

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: Brayden Tsang <brayttt1304.school@gmail.com>
Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Co-authored-by: Initdd <joaomariagoncalves@sapo.pt>
Co-authored-by: Ritam Saha <ritamsaha00@gmail.com>
Co-authored-by: Joel Pinto <geral.joelpinto@gmail.com>
Co-authored-by: Andrea Andre <andrea.tsg19@slmail.me>
Doublonmousse and others added 6 commits November 21, 2024 14:57
… mode

This allows one element to be resized/rotated in this mode even if a stroke/image is behind.

The old behavior can be forced in this mode when pressing `Shift`
…lxzt#1285)

* make zooming consistent

make zoom consistent

Take 1/zoom_in for zoom_out so that doing one zoom in then one zoom out ends up back to the same place

add more accelerators for zoom and keypad

- accelerator to reset zoom : ctrl + 0 (be it on the keyboard or numpad)
- added accelerators for keypad 1 to 6 for the selection of tools
- add `ctrl + =` for zoom in
- add `ctrl + +` and `ctrl + -` for + and -  the numpad keys

* fmt
fixes deprecation warnings and prevents invalid installer file names
…lxzt#1281)

* fix: improve the clipboard pasting of files for better cross compatibility

use `read_future(&["text/uri-list") ...` instead of `read_text_future` when pasting files.

This will make it work on the next gtk stable release (4.18) on mac os

* cleanup: use helper function for all `InputStream` to `Vec<u8>` reads
@Doublonmousse
Doublonmousse marked this pull request as draft February 2, 2025 09:43
@Doublonmousse

Copy link
Copy Markdown
Collaborator Author

Putting back in draft as this needs a little work before it can be merged.
I'm wondering if the condition can be slightly modified to include time delay as well. It will cancel a dot after a selection but sometimes this dot can be large enough to stay (if the pen slides a bit instead of a clean hit)

Kneemund and others added 18 commits February 4, 2025 10:03
Switches to the maintained flathub fork of the flatpak builder action.
* Update translation files

Updated by "Update LINGUAS file" hook in Weblate.

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/

* Translated using Weblate (Italian)

Currently translated at 100.0% (556 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/it/

* Added translation using Weblate (Basque)

* Translated using Weblate (Dutch)

Currently translated at 98.3% (547 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/nl/

* Translated using Weblate (Indonesian)

Currently translated at 46.0% (256 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/id/

* Translated using Weblate (Portuguese)

Currently translated at 45.8% (255 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/pt/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 80.3% (447 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/pt_BR/

* Translated using Weblate (French)

Currently translated at 98.7% (549 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/fr/

* Translated using Weblate (Persian)

Currently translated at 37.4% (208 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/fa/

* Translated using Weblate (Portuguese)

Currently translated at 46.0% (256 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/pt/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (556 of 556 strings)

Translation: rnote/repo
Translate-URL: https://hosted.weblate.org/projects/rnote/repo/nl/

---------

Co-authored-by: Matteo Ballabio <matteo@ballabio.dev>
Co-authored-by: Peio Urrutibeaskoa <peiourrutibeaskoa@gmail.com>
Co-authored-by: Timo <timovdvenne@gmail.com>
Co-authored-by: Darnivo <darrenivano04@gmail.com>
Co-authored-by: Pedro Wasconcelos <pedro.wasconcelos@proton.me>
Co-authored-by: Adrien Lesage <adrienlesage2005@gmail.com>
Co-authored-by: Tooraj Taraz <tooraj.taraz@yahoo.com>
Co-authored-by: Pavel Ovchinnikov <opavel@internet.ru>
…#1381)

fixes program not using on_conflict when terminal non-interactive
by using a patched poppler-rs.
This is a workaround until the issue is fixed upstream.
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.

Define exit behavior of the tools

10 participants