[PATCH] Support dark mode in workarea

Stephan Witt st.witt at gmx.net
Sun Dec 13 10:01:20 UTC 2020


Am 13.12.2020 um 09:53 schrieb Jürgen Spitzmüller <spitz at lyx.org>:
> 
> Am Samstag, dem 12.12.2020 um 15:05 +0100 schrieb Jean-Marc Lasgouttes:
>> Le 12/12/2020 à 11:02, Jürgen Spitzmüller a écrit :
>>> One issue I see is that the IconInfo inset does not use the adapted
>>> icons; it loads the icon files directly via graphic inset.
>>> 
>>> This could be fixed by using a QPixmap (or QImage) via QPainter
>>> instead. Then we can just do the same overlay we do for the
>>> toolbars.
>>> 
>>> This would be good anyway (using InsetGraphics here strikes me a
>>> misuse). Alas, I have no idea how to do that. Probably we need to
>>> re-
>>> implement something similar to RenderGraphic::draw to InsetInfo.
>> 
>> Displaying InsetInfo as an InsetText may have seemed a good idea at
>> some 
>> time, but it creates a lot of issues, unfortunately.
> 
> I see.
> 
> I have now addressed the issue at least in a tentative way.

I’ve tested it and think you’ve made a big step forward. Thank you again.





I’ll do some investigation how to detect the switch from or to dark mode at runtime. 
I think it’s worth to afford - see the effect below. (Switch from dark mode back to normal.)



Qt widgets act accordingly. So, the icons should be recomputed as needed at runtime, IMO.

Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201213/ef5e69bf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-12-13 um 10.38.39.png
Type: image/png
Size: 279481 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201213/ef5e69bf/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-12-13 um 10.41.39.png
Type: image/png
Size: 104784 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201213/ef5e69bf/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-12-13 um 10.43.10.png
Type: image/png
Size: 125441 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201213/ef5e69bf/attachment-0005.png>


More information about the lyx-devel mailing list