QML plasmoid and compact representation

Michail Vourlakos mvourlakos at gmail.com
Mon Feb 4 13:25:46 UTC 2013


Στις 04/02/2013 11:47 πμ, ο/η Marco Martin έγραψε:
> On Sunday 03 February 2013, Lionel Chauvin wrote:
>> Hi all,
>>
>>
>> Some C++ plasmoids, as for example the 'weather' plasmoid, are changed into
>> a compact representation when they become too small. When the user clicks
>> on a compact representation, the full plasmoid is displayed in a popup.
>>
>> I would like obtain the same behavior with a declarative plasmoid but
>> according to the documentation
>> (http://techbase.kde.org/Development/Tutorials/Plasma/QML/API#Properties_e
>> xported_from_the_main_QML_item): "if the plasmoid is a popupapplet, the
>> component in compactRepresentation will be used instead of the icon and
>> will always be collapsed,
>> regardless if it's in a panel or not."
>>
>> Is it the correct behavior or is it just not fully implemented ?
>> Can I workaround this behavior?
>>
> I want to change it in the future, but for now there isn't much way around.
> note that is also the behavior for c++ plasmoids. the ones that collapse and
> expand depending to the size are the ones that have just an icon.
> for that you can just make an applet of type popupapplet, not setting the
> compact representation and an icon will be used instead
>
There is a workaround for this but it is a little big. I have achieved 
this for my clean qml plasmoid.
Actually there is a way to access all the public api of a popupapplet 
through a clean qml plasmoid.
(that is a big hack but it can be done, I use it also to access the 
effectiveWinId in my plasmoid to
show window previews). For this feature the hack is needed just to 
discover if the plasmoid is in the panel.
I dont describe how can this be done because I dont know if that's ok 
with the guidelines of the mailing list
and I dont want to be kicked out... :) If some big names answer that I 
can describe
the way to achieve this, I will immediately provide the information... 
(even though I am afraid
that from 4.12 this way will be disabled afterwards ... :( )






More information about the Plasma-devel mailing list