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: shortcuts for color setters #1361

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

Conversation

madonuko
Copy link
Contributor

@madonuko madonuko commented Feb 17, 2025

Add <Alt>1, <Alt>2, ..., <Alt>9 as the shortcuts for the color pickers (at the top of
the window).

Add 1, 2, ..., 9 as the shortcuts for the color pickers (at the top of
the window).
Turns out that was a really bad idea and you wouldn't be able to type
numbers in textboxes.
@mahdi4261
Copy link

I really wanted that feature for a long time. Thanks for implementing that. But, this shortcut is already used for switching to specific tabs. For example Alt + 3 to go to 3rd tab.

@madonuko
Copy link
Contributor Author

madonuko commented Mar 7, 2025

Didn't know that, I feel like it's more frequent to switch colors than to switch tabs, so maybe it's not a bad idea to remap tab switching to Ctrl+Alt+n?

@mahdi4261
Copy link

I agree with you that I rarely (probably never) switch tabs with that keyboard shortcut. I just reminded you about the conflict.

@Doublonmousse
Copy link
Collaborator

Pretty sure the shortcut is not set by rnote but by the use of Adw>TabBar in rnote for having tabs, and I'm not sure it's settable.

I'd be somewhat weird to have rnote be the only gtk/adwaita application where the Alt+<Number> keyboard shortcut for switching tabs didn't work so I'm not really in favor of overriding this keyboard shortcut.

I didn't know the shortcut and I'm not sure it not showing in the keyboard shortcut window is intended behavior (though that's a separate issue altogether)

@flxzt
Copy link
Owner

flxzt commented Mar 16, 2025

what about using ctrl+shift+<n> for switching colors?

Comment on lines +169 to +174
[
[p.setter_1(), p.setter_2(), p.setter_3()],
[p.setter_4(), p.setter_5(), p.setter_6()],
[p.setter_7(), p.setter_8(), p.setter_9()],
]
.concat()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we really need to split the array for aesthetic purposes, but it does look better ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean I could revert it but… it looks nice so :3

Co-authored-by: Moritz Mechelk <moritzmechelk@gmail.com>
@Kneemund
Copy link
Collaborator

Could you please run the formatter again? It seems like that small change made the line too long, which is why the CI is failing :/
LGTM otherwise, thanks!

@Atreyu-94
Copy link

I was thinking if there was still the possibility of adding a shortcut to make the fill or stroke transparent.

This would help us save one of the colors. Boxes without background and with background are usually used and right now there is no easy way to do it.

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.

6 participants