SUMMARY The Qt Quick Controls icon documentation states: https://doc.qt.io/qt-6/qtquickcontrols-icons.html > Theme icons are referenced by a name, and regular icons by a source URL. > Both icon.name and icon.source can be set to ensure that an icon will always > be found. If the icon is found in the theme, it will always be used; even if > icon.source is also set. If the icon is not found in the theme, icon.source > will be used instead. but this is not the case when running with Desktop or Breeze style. Instead icon.name and icon.source can take either an icon name or URL, and icon.name is given a higher priority. This means I can do `icon.name: "image://MyProvider/cool-icon"` or `icon.source: "media-playback-start"` get an icon. The issue is that this does not match the behavior of upstream styles, so developers who accidentally use the wrong property will unknowingly break the app when running with other styles. STEPS TO REPRODUCE 1. Build Elisa at commit ffc7a58b (latest master) 2. Run in desktop mode with Desktop style 3. Open application menu 4. Open color scheme menu 5. Close Elisa & launch again but with Material style enabled 6. Re-open color scheme menu OBSERVED RESULT With Desktop style: color scheme icons are shown With Material style: no color scheme icons are shown EXPECTED RESULT With both styles: no color scheme icons are shown SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20240609 KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.3-1-default (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION
This seems like the sort of thing where if we correct it, we break our own apps. :(
In the meantime, we should definitely fix incorrect usages in our own apps to ease that burden should we decide to make a change in the frameworks.
Another awkward element here is that Kirigami.Icon has only a source property, habituating people to using a property with "source" in it to pass an icon name rather than an image file or something.
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/597
Git commit 5efadbd94ef26e2686fa32cfb17955ffb92c671d by Nate Graham, on behalf of Jack Hill. Committed on 22/07/2024 at 15:47. Pushed by ngraham into branch 'master'. Fix missing color scheme icons with non-default QQC2 styles M +4 -1 src/qml/ApplicationMenu.qml M +2 -1 src/qml/SettingsForm.qml https://invent.kde.org/multimedia/elisa/-/commit/5efadbd94ef26e2686fa32cfb17955ffb92c671d
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1605
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/423