Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2019 15:50:33 -0500
From:      Ken Moore <ken@ixsystems.com>
To:        Grzegorz Junka <list1@gjunka.com>
Cc:        <freebsd-x11@freebsd.org>
Subject:   Re: Lumina and env variables
Message-ID:  <99cd58ec-ba66-4076-883f-9f8a0d1101d7@ixsystems.com>
In-Reply-To: <138c2530-22bd-85ec-da4d-0d033fba926c@gjunka.com>
References:  <4c339ec6-b03b-dfe4-f694-af403dc5d89a@gjunka.com> <54013c32-3b8e-4911-bc53-faca7d255c7a@ixsystems.com> <138c2530-22bd-85ec-da4d-0d033fba926c@gjunka.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, January 26, 2019 1:37:34 PM EST, Grzegorz Junka wrote:
> On 21/01/2019 15:41, Ken Moore wrote:
>> On Saturday, January 19, 2019 9:33:41 AM EST, Grzegorz Junka wrote: ...
> Thank you Ken, that's a great tip. Does it mean that all Lumina=20
> apps are qt5-based?
>
> I am a bit lost with all those customization applications. I=20
> have QT 4 Configuration, which is using Desktop Settings, and I=20
> have Customise Look and Feel, which seems to be changing GTK=20
> settings. Then I have Desktop Configuration, which seems to be=20
> running a yet different version of the Lumina Theme Engine, i.e.=20
> Theme Engine run from the menu currently shows a window with a=20
> dark theme and proper icons on buttons, but when running from=20
> Desktop Configuration shows a light theme with no icons on=20
> buttons, even though all settings seems to be the same. The same=20
> lack of icons on buttons is visible in other QT-based=20
> applications, i.e. Kate but not KWrite. Also the Desktop=20
> Configuration seems to have a different set of icons then=20
> selected in the Theme Engine (material design instead of=20
> Oxygen).
>
> It's really weird. Imagine Lumina Theme Engine run from the=20
> menu (LTH1) and from Desktop Configuration (LTH2). Changing=20
> Style and Color scheme in LHT1 is visible in its preview window,=20
> and when applied also changes LTH1 window (and KWrite). But LHT2=20
> (and Kate) remain unaffected. Changing Style and Color scheme in=20
> LHT2 is visible in its preview window, but when applied again=20
> changes only LHT1 window (and KWrite) - LHT2 window (and Kate)=20
> remain with the same (probably generic) theme and no icons on=20
> buttons.
>
> I have been using Lumina from an early version and possibly=20
> some configuration files have been screwed up throughout the=20
> iterations. I also tried to overwrite QT_QPA_PLATFORM_THEME in=20
> various places, including=20
> .config/lumina-desktop/envsettings.conf, and deleting some=20
> configuration files in .config and .kde/4 folders. Would you=20
> know which configuration folders should I delete to restore=20
> default settings? I understand I should not try to set=20
> QT_QPA_PLATFORM_THEME/QP_QPA_PLATFORM_THEME anywhere?
>
> GrzegorzJ
>

Welcome to the chaotic world of application theming... ;-)

Let me give you the big picture first, and then focus on the Lumina side of=20=

things:

1. Every single toolkit has their own theme implementation.
This means that GTK2, GTK3, Qt4, Qt5, EFL, and any other graphical toolkits=20=

all expect their own theme specification/settings. There have been attempts=20=

to unify them a bit (GTK2 <--> Qt4, GTK3 <--> Qt5), but overall those=20
unification systems tend to fizzle out and die pretty quickly because the=20
standards for each change so rapidly (I blame GTK for that, but that is a=20
topic for another time completely). I think the QtCurve theme engine is=20
probably the closes one to achieving multi-toolkit support, but it also has=20=

a frustrating lack of customizability - so if you don't like the QtCurve=20
theme, then you are stuck doing it yourself. This also means that every=20
theme engine for every toolkit could have it's own utility for customizing=20=

the theme (if supported), which is probably where you are getting so many=20
"theme configuration" utilities from that each look very different.

2. The "standard" for icon themes is a non-standard.
The [XDG=20
standards](https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-=
latest.html)=20
for icon themes are pretty well followed by all the toolkits with regards=20
to detecting/using a particular icon theme, but the standard only lists=20
~20-30 icons in the standard and is nowhere close to being usable by=20
itself. A "full" icon theme has closer to 500+ icons at the present time,=20
but each one uses it's own naming specification (because the XDG spec is=20
non-specific), resulting in widely varying support for an application to be=20=

able to switch between icon themes without "losing" icon support for=20
particular things. There is some continuity between icons themes if they=20
come from the same source (all the GNOME themes tend to use the same naming=20=

scheme, the KDE/Plasma icon themes use the same naming scheme, etc), but=20
those different naming schemes are not compatible with each other in=20
general. This results in people trying to develop "full" icon themes having=20=

to track down and implement tons of symlinks for icons just to try and=20
catch all the variations of an icon name that are used across different=20
applications and desktops (this is a huge task and most icon theme=20
developers just give up after a short time).=20
For an example, the icon theme we are using for Project Trident technically=20=

has 6865 different icons (all of them SVGs - prevent duplication of the=20
same icon across different size ranges like the specs use). Of those icons,=20=

I would estimate that we have close to a 10:1 ratio of symlinks to real=20
files just in order to account for variations in icon naming across the=20
various apps/desktops, and we are *still* having issues with some apps not=20=

being able to find icons occasionally.

3. Xorg mouse cursor themes
Don't ask. This is yet another "standard" that most toolkits load by=20
default but completely ignore at the first chance they get because the=20
"standard" is insufficient for tons of things.


Now for the lumina side of things.
1. Lumina is completely Qt5-based, so the Lumina theme engine is *only*=20
used for theming Qt5-base applications. This means that KDE4 applications=20
will not use it (Qt4), Firefox/Chromium will not use it (GTK2/3), but the=20
Falkon browser *will* use it (Qt5), and many of the KDE/Plasma5=20
applications will also use it (Qt5).

2. Instead of going for the one-size-fits-all approach to themes that most=20=

engines use, the Lumina theme engine is a fork/update of qt5ct which is=20
designed around the concept of a single theme engine being itself=20
configurable. For example, I mentioned the QtCurve engine previously and it=20=

follows the "engine=3Dlook" model where if you don't like it you have to find=
=20
another engine. qt5ct and lthemeengine take the approach that we stick to a=20=

single toolkit, but expose all of the configuration options via the engine=20=

itself - so a single engine can have an infinite number of appearance=20
outputs. The only thing the engine needs to stay in-sync with is the=20
toolkit it is allowing access to modify.

Example:
As part of lthemeengine, you have full access to set your own color palette=20=

and have it apply to all Qt5 applications the exact same way without any=20
difficult "styling" challenges. By and large, this is the main thing that=20
people want when looking to change the appearance of apps anyway, so they=20
can change some "highlight" color from red to blue or any color of the=20
spectrum that they want. Lthemeengine also provides access to selecting the=20=

icon theme and mouse cursor theme (which *will* apply to all toolkits if=20
they follow the XDG/Xorg specifications - which not all do). In addition to=20=

this lthemeengine gives access to a special type of thing called "Qt=20
Stylesheets" which is basically a way of using a CSS-like language[1] to=20
dynamically change the appearance of Qt5 widgets and items (which the=20
Lumina desktop uses for styling the panels, desktop plugins, and more). I=20
think GTK3 has a similar CSS-like system but uses a completely different=20
rules-set for it compared to Qt5.

[1] http://doc.qt.io/qt-5/stylesheet-reference.html


I am sorry for this "book" of information, but I hope this helps to clarify=20=

a bit of the whole theme mess for you and why everywhere you look you will=20=

find different answers to the same themeing problems (and I did not even=20
get started on how the different desktop environments overwrite the engine=20=

settings and provide their own ways of changing the appearance....)

--=20
~~ Ken Moore ~~
TrueOS/iXsystems



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99cd58ec-ba66-4076-883f-9f8a0d1101d7>