Simplify KRuler and give it a fresher look
Review Request #130152 - Created June 8, 2017 and submitted
I am sorry this patch is quite long: there was always something not completely OK while I was working on it, preventing me from posting the current state. I manage to split the changes in 3 patches. This is only the first one, but it still is a large beast.
I started by making KRuler draw scale numbers less often to avoid ugly overlapping texts. I then made it draw ticks on both sides, to go from 4 orientations (North, South, West, East) to 2: vertical or horizontal.
The optional rotation and buttons were getting in the way though: the symmetric ticks required the scale numbers to be vertically centered so buttons were overlapping it. I decided to remove them (they were already off by default): with only two orientations it is less useful to have rotation buttons: it is simple enough to use either the context menu, middle-click the ruler, or the
Rshortcut to change the orientation. Closing is accessible through the context menu as well.
One of the reasons (I think) for the 4 orientations was the color picker feature. It makes little sense to me to have a color picker in a ruler: it is more natural to use KColorChooser to pick colors. I removed the color picker, allowing me to remove the oddly shaped mouse cursor and refresh the appearance of the length indicator to something a bit nicer (IMHO).
I then made it easier to adjust the length of the ruler by dragging its edges instead of having to pick the appropriate length from a sub-menu of the context menu. This made it possible to remove this sub-menu.
Oh, and I updated the documentation! Hopefully without Docbook errors.
Used it a lot. Did not catch any regression.
Works a charm.
I wonder if the opacity option should be changed so you can't turn it up to 100, very confusing when on a black application such as Konsole, it all disappears
You should add yourself to copyright holders and maintainer.
There's code in here to create a systray icon but I have no systray icons. Does it still work?