Ginj-capture / Ginj

Ginj capture
GNU General Public License v3.0
26 stars 7 forks source link

Transparent background for text? #60

Closed qu0zz closed 4 months ago

qu0zz commented 5 months ago

I can't find a way to produce text with a transparent background. This would be useful because it's often the case that the opaque background behind the text obscures some part of the picture which is wanted. I don't know if the standard java colour-picker allows variable transparency?

(Noting that the following related comment will be in a separate issue/request: Also it's worth bearing in mind that the transparency also applies to the box surrounding the text. If the background is transparent you may not want a visible box around it, and it's not always visually appropriate to have a box surrounding a caption or text).

vicnevicne commented 5 months ago

Honestly making the background transparent is quite straightforward, but most of the work is creating a UI to choose to make it transparent or not. Note that the original Jing had a floating menu above the annotation tool but it only allowed to change the font face, size and color (which could be different from the border), not the background: 2024-04-10_23-40-22 I didn't implement it because it was much work and I thought it wasn't absolutely required (and indeed nobody requested it here ;-)) but if we had it, that would be the perfect place... As for the actual "background transparency" control, do you think a simple "glass" icon would suffice or would a cursor be needed to select any level of transparency ? We could even go overboard and add a separate color picker to also allow selection of the background color, but I'd rather keep it simple, so either a toggle transparent/opaque white, or a cursor to adjust transparency. What do you think ?

qu0zz commented 4 months ago

hi vicnevicne If given a choice the cursor would be my preferred option because it covers all bases, BUT I have to be honest, if a transparent background had been available I would have been very happy with that (and wouldn't have suggested variable transparency ) as I consider captioning being for "quick and dirty" annotation, so it all depends on the amount of work you have to do to implement one or the other! (apologies for delay in reply). The background colour has to be selectable in the cases where you want a background because it has to contrast the selected text colour. In the current implemendation the "forced" appearance of a (coloured) box (or for that matter any box that is unwanted) is more of an impediment than an enhancement in many situations, (meant in the nicest possible way!). I know keep it simple is sometimes harder to implement, but my starting point would be plain text of a chosen colour with no background (transparent), then do you need a (text) background to make the text stand out when there are (for example) fussy multicoloured contents in the screenshot behind the text, (or simply to visually enhance the text impact) and then, much less of an issue (for me personally as most of the time a box isn't required), does it need a box?...If I were choosing to have a box I would then want to be able to choose the weight and shape. (noting that if the box was transparent that would cover not wanting a box) As ever others may have a different opinion. Good luck whatever you decide, I'm so grateful to have what you've produced!

vicnevicne commented 4 months ago

I had already worked on a "all or nothing" version in the meantime, so that's what is implemented in 0.4.12. If you think a cursor for semi-transparency would be better, feel free to reopen it.