QML Buttons and SVG images

Marco Martin notmart at gmail.com
Tue Nov 6 09:34:00 UTC 2012


On Tue, Nov 6, 2012 at 10:24 AM, Dmitry A. Ashkadov
<dmitry.ashkadov at rosalab.ru> wrote:

>> this should be using the Button QML element, which does support using SVG files.
>
> but did you mean that that QML Button is Button from Plasma Components (org.kde.plasma.components)? I looked at code of QML button but I didn't see any property to set elementID of svg file. Yes, it handles case if a name of icon is a elementId, but I need to show an arrow and its [arrow] svg image has elementID that isn't the same as a name of icon, moreover its image path (svgIcon.imagePath) doesn't start from "icons/".

in this particular case  i think it should be used just a SvgItem
(with clicking managed by MouseArea)

this for both the arrow and the task icons, that right now are quite
complex as code, and they don't resize (altough they are usually
always 24px, they must be resized down in the case the panel gets
smaller)

Cheers,
Marco Martin


More information about the Plasma-devel mailing list