Hi,
there was a recent discussion about the lack of a way to draw straight lines with the brush mask in ART, and how awesome and important this feature would be to bring the tool “out of the narrow FOSS loop”. I said that it would be a good idea but I wasn’t interested in doing this myself, but never say never. Well, today I had some free time, so I thought about this a bit more, and it turned out that it can be done in exactly 5 lines of code:
So, I just added that: now, you can draw straight lines by holding the Alt key. And as promised, since this was @Eigil_Skovgaard’s idea, I’ve added his name to the AUTHORS.txt file, under the contributors section. I hope now we are ready to dethrone Adobe
Well, I’m just trying to live up to my “annoying arrogance” reputation Though if I really wanted to show off, I would have sacrificed some readability and done it in one line
Maybe the procedure is not clear… Let me try to explain. First you click normally to define the starting point (without holding Alt), then you move the mouse to the end point (without clicking anything, i.e. without “dragging”), then you click again while holding the Alt key, and now you should have your line … Can you confirm this is what you were doing? Thanks!
Hmm, I’m on Xfce as well but it does not work for me.
Xubuntu 20.04.2 LTS, Art Version: 1.9.3-16-g9140a11d0
Branch: master
Commit: 9140a11d0
Commit date: 2021-08-08.
My impression was that after clicking the Alt key to make that straight line, Xfce is waiting for a second key to do something. Using left Alt, I can move a window with mouse left-click and resize a window with Alt + right click. But no straight line in Art.
I think @agriggio’s initial idea about this being a WM problem might be correct. I have run into alt/meta/super key problems in the past and WMs do tend to “steal” some of them for their own uses.
About Xfce: Have a look at the Window Manager Tweaks, specifically the Accessibility tab. The top entry, Key used to grab and move windows is set to Super in my case, I’m assuming yours is set to Alt (not sure if that is the default setting). I changed that back when I started using Krita and ran into the alt key being needed by some of the tools.
If the control and shift keys do not pose a problem, would it be an option to let the straight line functionality work if you press both of them at the same time, instead of alt?