Is it possible to know when a PlasmaCore IconItem is ready?

Michail Vourlakos mvourlakos at gmail.com
Fri Jul 29 15:53:59 UTC 2016


David, sorry for the previous e-mail it was sent by mistake...

I also thought maybe is something wrong with the IconItem so I used
the following code,
a static image for all tasks... Same problem... my guess is that that
the DropShadow is updating because there is a change it its scale even
though there is a live:false in the ShaderEffectSource

-----

Image{
        id:iconImage
        width: 64
        height: 64
        source: "firefox.png"
    }

    DropShadow {
        id:shadowImageNoActive

        width: 64
        height: 64

        scale: wrapper.scale * wrapper.appearScale

        anchors.centerIn: parent

        radius: 7.0
        samples: 10
        color: "#90080808"
        source: ShaderEffectSource {
            id:effectSource
            width: iconImage.width
            height: iconImage.height
            sourceItem: iconImage
            hideSource: true
            live: false
        }

    }

On 7/29/16, Michail Vourlakos <mvourlakos at gmail.com> wrote:
> PlasmaCore.IconItem {
>         id: iconImage
>
>         width:64
>         height:64
>
>         anchors.centerIn: parent
>
>
>     }
>
>     DropShadow {
>         id:shadowImageNoActive
>
>         width: 64
>         height: 64
>
>         scale: wrapper.scale * wrapper.appearScale
>
>         anchors.centerIn: parent
>
>         radius: 7.0
>         samples: 10
>         color: "#90080808"
>         source: ShaderEffectSource {
>             id:effectSource
>             width: iconImage.width
>             height: iconImage.height
>             sourceItem: iconImage
>             hideSource: true
>             live: false
>         }
>
>     }
>
> On 7/29/16, David Edmundson <david at davidedmundson.co.uk> wrote:
>> Given you already have
>>
>> usePlasmaTheme:false
>>
>> does using QIconItem from KQuickControlsAddons work any better?
>>
>> David
>>
>> On Fri, Jul 29, 2016 at 4:35 PM, Michail Vourlakos <mvourlakos at gmail.com>
>> wrote:
>>
>>> >
>>> > Move the IconItem outside the DropShadow.
>>> > Otherwise you're scaling the source still, which is what we want to
>>> avoid.
>>> >
>>> > Out of curiosity, how are you measuring performance?
>>> >
>>>
>>> David even this way I get the same bad performance... This is the code
>>> inside a task delegate. I have implemented a qml plasmoid that acts as
>>> an alternative task list but it mimics the plank animation or mac
>>> style. The main animation in this case is when the user hovers a task
>>> and that task is zoomed and its neighbour tasks also. Most of the code
>>> is based on the current tasks plasmoid of 5.7 except the appearance
>>> and the animations.
>>>
>>> To check the performance I install the plasmoid with "plasmapkg2 -u "
>>> and after that I use plasmawindowed to watch it. After that I open
>>> ksysguard and I watch the cpu% that is used when then user hovers the
>>> tasks and goes its mouse on the task list back and forth. With the
>>> following code my sluggish old netbook reaches and remain at around
>>> 80% of cpu cycles when the user hovers tasks in that list, and
>>> actually there is no smooth animation at all. With the Images solution
>>> I sent earlier this is at 40% cpu in the same hardware and there is a
>>> smooth hovering animation.
>>>
>>> In my main computer at the office with the following solution I get
>>> around 25% of cpu with smooth animation but with the Images solution I
>>> get maximum 9% of cpu
>>>
>>>
>>> -----------------------------------
>>>  PlasmaCore.IconItem {
>>>         id: iconImage
>>>
>>>         width:64
>>>         height:64
>>>
>>>         anchors.centerIn: parent
>>>
>>>         active: true
>>>         enabled: true
>>>         usesPlasmaTheme: false
>>>
>>>         source: decoration
>>>
>>>     }
>>>
>>>     DropShadow {
>>>         id:shadowImageNoActive
>>>
>>>         width: 64
>>>         height: 64
>>>
>>>         scale: wrapper.scale * wrapper.appearScale
>>>
>>>         anchors.centerIn: parent
>>>
>>>         radius: 7.0
>>>         samples: 10
>>>         color: "#90080808"
>>>         source: ShaderEffectSource {
>>>             id:effectSource
>>>             width: iconImage.width
>>>             height: iconImage.height
>>>             sourceItem: iconImage
>>>             hideSource: true
>>>             live: false
>>>         }
>>>
>>>     }
>>> _______________________________________________
>>> 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