Various VDG and Plasma people had a meeting about how we want theming and styling in Plasma 6 to work. We tentatively came up with the final conclusion:
Generally, we want to make Plasma themes style everything. You should be able get a plasma theme and apply it to both Plasma and your KDE/Qt apps. It would become a general "KDE theme", essentiallydecided that we want for theming across apps and Plasma to consume the same themes such that it's finally possible to have a consistent look and feel in both with one theme.
In terms of implementation, this would look like the QStyle becoming a theming engine that knows how to load SVGs and apply them to QWidgets UI elements. For cases where there is no available SVG in the currently-loaded SVG theme for a QWidgets element, it would have to fall back to a QPainter-drawn appearance, presumably in whatever style is the default at the time.There are a few ways we could do this:
Benefits of this approach include:1. **Make a QStyle that's able to consume Plasma themes and apply them to apps**. This would basically be replicating Kvantum, but hopefully better, and more supported, and faster, and less hacky.
- Unified styling between Plasma and desktop apps becomes easily possible
- SVG-based application styles are easier to create and modify than C++-based QStyles are
- Can use the GHNS system to distribute and get SVG-based styles
- Could drop PlasmaComponents stuff entirely in favor of using upstream QQC2 controls with SVG theming applied to them (moving the SVG theming logic out of Plasma and into qqc2-desktop-style2. **Create the concept of a new "universal theme" that uses CSS to define everything**, and then make a QStyle and QQC2 theme that's able to consume these themes and apply them to QWidgets apps, QQC2 desktop apps, and also Plasma, and port all of Plasma to use QQC2 and away from PlasmaComponents, deprecating SVG Plasma themes.
The big advantage of #1 is that we could re-use the existing SVG Plasma themes, though a theme would need a lot of modification to add desktop-specific components to properly style a desktop app.
The big advantage of #2 is that we would abandon SVG-based theming in Plasma, which is really fiddly and breakable and not well-liked by most KDE developers who have contact with it. Another conceivable advantage would be to allow this new universal CSS-based theme easily generate GTK themes as well, which are also CSS-based.
Regardless of which option is chosen, I suppose)general advantages of either approach are:
- Could end up obviating the desire for Kvantum, which serves the same purpose as an application theming engine you load themes into
Overall it seems possible but we need to address various technical hurdles:Unified styling between Plasma and desktop apps becomes easily possible
- SVG or CSS-based styles are easier to create and modify than C++-based QStyles are
- Ensure adequate performance; don't want apps to- Can use the GHNS system to distribute and get slower compared to using QStyle-based themingthemes for apps as well
- Improve tooling and documentation for working with SVGs- Could drop PlasmaComponents stuff entirely in favor of using upstream QQC2 controls with the new theming system applied to them
- Potentially others toCould end up reducing the user demand for Kvantum, which serves the same purpose by being an application theming engine you load themes into