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 8 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?

@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.

@flxzt
Copy link
Owner

flxzt commented Apr 6, 2025

hm, it does not seem to work on my machine, not sure why.

@Kneemund
Copy link
Collaborator

Kneemund commented Apr 6, 2025

That's probably due to <Shift> being part of the shortcut, which makes keyboards produce special characters instead of numbers. GTK could handle this, but it doesn't seem to. Changing the shortcut to e.g. <Ctrl><Alt>{i}, like suggested above, works fine.

@flxzt
Copy link
Owner

flxzt commented Apr 6, 2025

Changing the shortcut to e.g. {i}, like suggested above, works fine.

sounds good to me.
These new shortcuts also need to be documented in the shortcuts window

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.

Wouldn't using a transparent color as color field satisfy this usecase?

@Atreyu-94
Copy link

Atreyu-94 commented Apr 6, 2025

Wouldn't using a transparent color as color field satisfy this usecase?

No, because that way we lose a color. For example, if I have yellow selected, I would like to be able to select a key to give it 50% transparency and then return it. That would help me to have transparencies for each color and not a single color that I have to be constantly changing to achieve transparency

@madonuko
Copy link
Contributor Author

madonuko commented Apr 6, 2025

I'm back! (?)

So I've been thinking: I started from assigning 1~9, then <Alt>1~9, then <Ctrl><Alt>1~9, and then I find myself barely using those shortcuts anymore simply because they are not really short-cuts.

I was like why not revisit the supposedly simpliest shortcut ver. and fix the issue? So here I am again back to 1~9.

Edit 1

Oh well this doesn't work because now I can't change the stroke thickness.
I'm no gtk expert so is there a way to add a condition for a shortcut?

Edit 2

Fixed that in the commit below.

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