shutter-project / shutter

Screenshot tool for Linux
https://shutter-project.org/
GNU General Public License v3.0
519 stars 34 forks source link

highlighter stroke color does not stick #207

Open Photon89 opened 4 years ago

Photon89 commented 4 years ago

If I use the highlighter tool on an image, select a different stroke color, and try highlighting using the new stroke color, it automatically reverts back to the default color, which is incorrect and inconsistent with the other drawing tools.

To replicate:

  1. Open a screenshot in the Shutter Drawing tool.
  2. Select the highlighter tool. Notice that the stroke color is yellow.
  3. Select the Stroke Color and set the color to something else.
  4. Attempt to highlight with the new stroke color, but notice how it incorrectly automatically reverts back to yellow, preventing you from using the highlighter tool with any other color.

I am running Shutter 0.93.1 Rev. 1278 on ubuntu 16.04

Launchpad Details: #LP1606992 wheelerlaw - 2016-07-27 16:39:39 +0000

Photon89 commented 4 years ago

I can confirm. Using Shutter 0.93.1 Rev. 1278 on ubuntu 16.10

Launchpad Details: #LPC Robert van Kints - 2017-03-10 09:44:54 +0000

danielcaballero88 commented 2 years ago

I confirm this is still an issue in Linux Mint 20.2 Cinnamon, Shutter 0.99.2 Rev.1593

The rest of the tools work fine: when using any of them the color is the last color selected (for any tool). For instance, when drawing arrows I change the color to blue, then all subsequent arrows are blue. If I change the tool to drawing rectangles, still the (border) color is blue.

The highlighter, instead, always defaults to yellow. Changing the color while using the highlighter changes the last highlighted text, but any subsequent highlights are again yellow.

Photon89 commented 2 years ago

Looks like it happens here: https://github.com/shutter-project/shutter/blob/master/share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm#L1035 The problem is that the stroke color and thickness is shared across the various tools, so if they are not reset for the marker (and also censor) tool, they will be used by the other tools as well and we will get semitransparent thick arrows and lines. Looks like the best way to fix this would be to introduce additional variables for the marker and censor tool line width and color, but this might require GUI changes (not sure if setting different variables using the same line color and thickness buttons will work).