Summary: | The QML code uses hardcoded icon paths | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | Martin Klapetek <mklapetek> |
Component: | call-ui | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, matt.scheirer |
Priority: | NOR | ||
Version: | git-latest | ||
Target Milestone: | 0.8.80 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/telepathy-call-ui/a82a6b998b56abc4f2a271f57b213fa25e4d0582 | Version Fixed In: | |
Sentry Crash Report: |
Description
Martin Klapetek
2014-08-27 21:32:16 UTC
You can use iconName with a bunch of QML elements to specify icons according to the Freedesktop Naming Scheme (see here: http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) that will inherit the users icon theme settings, and you can supply a fallback. Here is an example from one of my other apps I just ripped out to show: Action { iconName: playing ? "media-playback-pause" : "media-playback-start" iconSource: playing ? "icons/kfaenza_media-pause.png" : "icons/kfaenza_media-play.png" } If the iconName has a corresponding system icon, it uses that first. If it does not exist, it falls back to my specified iconSource, in which case I just bundled the kfaenza theme icons in case, but in my experience I've never found a circumstance where this fails. I don't use it anymore - this was just from some old code I had early on. So instead of setting iconSource, set iconName. Thanks, but I assume you're talking about QtQuick.Controls. I'm afraid this is all Qt4 code, just to make our lives harder. kdeclarative provided an icon:// image provider. Given we use use kdeclarative (hopefully?) it should mean it's added automagically. > Given we use use kdeclarative (hopefully?)
Not as far as I see. Should be added then.
Git commit a82a6b998b56abc4f2a271f57b213fa25e4d0582 by David Edmundson. Committed on 28/08/2014 at 00:52. Pushed by davidedmundson into branch 'master'. Set icons properly Reviewed-by: Diane Trout M +1 -0 CMakeLists.txt M +1 -0 src/CMakeLists.txt M +6 -0 src/dtmf-qml.cpp M +8 -0 src/qml-interface.cpp M +1 -2 src/qml/core/ToggleButton.qml M +7 -7 src/qml/core/Toolbar.qml http://commits.kde.org/telepathy-call-ui/a82a6b998b56abc4f2a271f57b213fa25e4d0582 |