Selection with alpha transparency
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Sep 14 15:00:36 UTC 2020
Le 04/08/2020 à 22:19, Daniel a écrit :
> Qt supports color alpha transparency. This can be used, for example, for
> semi-transparent selection boxes as is used in Libre and MS Office. The
> attached patch is only a very rough attempt. The screen captures show
> contrast the result.
Using transparency for selections is an excellent idea. Actually, I have
had thoughts about using transparency in othe rplaces, but it did not
occur to me that selections where the best place.
However, the code is currently built to create selections withouth help
from transparency, which means that the correct patch will not be that
easy, although it may end up simplifying the code. If we do that, we
lose the possibility to change (invert) the selected text, though. But
this is how libreoffice does it.
> The alpha transparency is applied only when "Use system colors" is
> enabled in Preferences > Color. This leaves it still possible for people
> to set their own selection color.
I do not think this is the best approach. It will probably be possible
to apply it everywhere, but we'll see.
> One still unresolved bug of the patch is, for example, that in certain
> situations certain elements, like pictures and insets start blinking
> together with the caret. Is the re-painting of certain elements when the
> caret blinks is on purpose?
Yes, this is what I was hinting at earlier.
JMarc
PS: I will not have time to work on this AFAIK.
More information about the lyx-devel
mailing list