qqc2-breeze-stlye in KDE Review

Noah Davis noahadvs at gmail.com
Thu Jan 7 07:02:57 GMT 2021


https://invent.kde.org/plasma/qqc2-breeze-style/

qqc2-breeze-style is a Qt Quick Controls 2 style made with Qt Quick
and Kirigami. It has a visual style that is meant to match the Visual
Design Group's vision for Breeze.

My motivations for making this include the following reasons.

- Creating, iterating on and maintaining a Qt Quick/Kirigami based
QQC2 style is relatively easy.

- Plasma Mobile needs an efficient QQC2 style.
    - qqc2-breeze-style has better graphical performance than Plasma
style/PC3 and qqc2-desktop-style. It doesn't depend on the speed of
the Qt SVG renderer when rendering elements for the 1st time and most
graphical elements are drawn with the GPU.
    - It has much better RAM usage than PC3, slightly better RAM usage
than qqc2-desktop-style and about the same RAM usage as Material.
After opening all pages of Kirigami Gallery, PC3 used 254MB,
qqc2-desktop-style used 185MB, qqc2-breeze-style used 182MB and
Material used 180MB. Take those numbers with a grain of salt since the
absolute amount of RAM used can vary based on how much free RAM there
is.
    - Its loading times are much better than PC3. I don't remember the
exact number, but I'm pretty sure it took half as long to load Index
(Maui file manager) on a PinePhone compared to PC3.

- We occasionally have QQC2 style compatibility issues with 3rd party
apps that don't force a specific QQC2 style and have been designed
using other QQC2 styles. qqc2-breeze-style is much more compatible
with the Default (Basic in Qt 6), Fusion and Material QQC2 styles than
Plasma style/PC3 and qqc2-desktop-style, so 3rd party apps should be
less likely to have issues with it. The Fusion QQC2 style will become
the default QQC2 style on Linux in Qt 6, so I'd expect to see more
apps designed for it in the future. Unless GNOME starts shipping an
Adwaita QQC2 style, Fusion will probably be the QQC2 style that 3rd
party desktop environment users see by default.

- I'd like 3rd party app developers to be able to adopt the look of
KDE apps even if they aren't part of KDE. As far as I know, there
aren't that many open source QQC2 styles out there. The visuals of the
Qt QQC2 styles are not terrible, but not very impressive either and
the Material QQC2 style is not up to date with Material Design.
qqc2-breeze-style could gain some popularity outside of KDE if it's
easy for developers to use and proven on low power platforms like
Plasma Mobile on the PinePhone.

- Plasma style/PC3 is unfortunately limited by needing to be
compatible with PC2 in order to not break existing Plasma themes. This
makes it a fairly poor choice for anything but Plasmoids and anything
else that doesn't need to be cross-platform or compatible with
multiple QQC2 styles. Using SVGs for UI graphics has its advantages
when you want to make something that isn't easy to make with just
Rectangle/ShadowedRectangle. However, it seriously gets in the way for
anything that can easily be made with just rectangles, which is most
UI graphics in the style of Breeze. Plus, manually editing SVGs in a
text editor to get the element IDs and CSS classes right is never fun.

- qqc2-desktop-style is unfortunately limited by the fact that it gets
most of its visuals from the system QStyle. This means there's no way
for it to do things that would be basic in Qt Quick, such as
animations and drawing shadows/glows/focus rings outside the bounds of
buttons. Changing the visuals at all is harder in general due to the
facts that the Breeze QStyle is massive and it's very easy to create
serious issues in many apps that are hard to fix. See the struggles
that went into making the new header area of the Breeze QStyle. In
QML, this would have been easy.




More information about the kde-core-devel mailing list