QML Buttons and SVG images

Dmitry A. Ashkadov dmitry.ashkadov at rosalab.ru
Tue Nov 6 11:22:39 UTC 2012


So, if I understand you right, now I shouldn't use QML Button instead of IconWidget? If I remove IconWidget then:

* I will have to work with QAction in QML myself (there is thread about QAction).
* An icon won't be highlighted when user moves mouse cursor over icon.
* An animation of icon, if user clicks on it, won't work.

P.S. If my review request was approved, my next work would be easier. 

----- Исходное сообщение -----
От: "Marco Martin" <notmart at gmail.com>
Кому: plasma-devel at kde.org
Отправленные: Вторник, 6 Ноябрь 2012 г 13:34:00
Тема: Re: QML Buttons and SVG images

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
_______________________________________________
Plasma-devel mailing list
Plasma-devel at kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the Plasma-devel mailing list