[PATCH] Support dark mode in workarea

Richard Kimberly Heck rikiheck at lyx.org
Fri Dec 11 20:17:56 UTC 2020


On 12/11/20 1:50 PM, Jürgen Spitzmüller wrote:
> Dear all
>
> The attached patch addresses #8325 and adds support for dark mode in
> the workarea.
>
> This adds another color to the ColorSet, x11darkhexname, and adds
> colors that work well with dark background for the semantic (not the
> static) colors. LyX automatically detects (well, guesses) whether it is
> in dark mode and then uses these colors rather than the light ones. 
> In this case, the prefs GUI also displays, and modifies, the dark
> variants.
>
> This works with and without "use system colors". See attached
> screenshot for an impression.
>
> The colors themselves are just tentative. I do not use darkmode myself,
> so I welcome any improvement to the currently set colors. Also I have
> certainly not checked all elements thoroughly.
>
> Note that this is orthogonal to any future theming approach. I think
> that themes should also ideally provide light and dark variants for
> each colour (though only light will work as well).
>
> Thoughts?

I also don't use dark mode, but the approach seems right. One question I
had, though, is whether it is better to adapt the icons on the fly
(which needs processing power) or to write some script that would
convert them all to 'dark' icons we could ship (we needs disk space). I
guess the question is how much processing is really involved.

Riki




More information about the lyx-devel mailing list