My experience with bad example (or my understanding is that bad.)

Simple story the likes of which happens all the time where an incorrect example together with my lack of knowledge led me to the world of hurt.

In the Falkon example QML extension in order to set some basic (top level) element the original author decided to use Rectangle component (or class? or object? or whatever, I will call it component). The Rectangle component is not supposed to be used this way since it is by default also setting the background to white and thus it is not styled by the KDE theme.

This led me to believe that the QML plugins in Falkon cannot be styled by the system theme (colors in KDE systemsettings) since the background was always white even when my theme was set to dark.

Than while stalking the #kde-devel IRC channel I saw that for QML (QtQuick) when used in my window manager setup I need to set an environment variable QT_QUICK_CONTROLS_STYLE=org.kde.desktop to follow KDE settings (maybe there is a way to set this automatically outside of KDE Plasma but I was not successful at that).

Back to original thought.

The Rectangle component is probably not supposed to be used to manage layouts and there has to be better suited component to do that. So far I tried Pane which works exactly as I envisioned it to (it follows system colors set in kde system settings), maybe there is even better suited component than this which would help me even more but so far it is the best result I got from my QML journey.

So my conclusion is to use elements which are styled by Qt by default, but while I was lurking at #kde-devel IRC channel for even longer and asked more and more question I got an answer I half expected but did not like.

WARNING Next paragraph can be wrong and is recollection of how I remember it.

The KDE team recommends using Kirigami or other framework to get the colors from system theme and set them manually. This allow them a great deal of flexibility and it is also used to utilize the additional colors configurable in KDE Plasma System Settings which are not part of general Qt. But for my purpose, I do not want to burden my little extensions with a KDE library just to get some system colors.

PS: This article was postponed for many months for no good reason.

Articles from blogs I follow:

Calamares towards 3.3.11

I’m going to change up the Calamares release process a little. It’s been slow going as a community-maintained project – which isn’t to say that that is a bad thing. Just slow. I’ve decided to make releases marginally more predictable than “when [ade] has …

via [bobulate] October 24, 2024

There is only one reason why Microsoft Windows is the dominating operating system on the PC desktop

The Internet is filled with blog posts, articles on tech media, and videos on YouTube about why Linux is not the main operating system on the PC desktop. "5 reasons why", "10 reasons why", bla, bla, bla. But they are all wrong.

via unixdigest.com August 24, 2024

Signing Android Apps Using a YubiKey (on NixOS)

In my spare time, I currently develop two Android apps using Flutter: AniTrack, a simple anime and manga tracker based on my own needs, and Moxxy, a modern XMPP client. While I don't provide release builds for AniTrack, I do for Moxxy. Those are signed u…

via PapaTutuWawa's Blog July 24, 2023

Generated by openring