QML plasmoid and compact representation
Michail Vourlakos
mvourlakos at gmail.com
Tue Feb 5 12:31:10 UTC 2013
Στις 04/02/2013 09:36 μμ, ο/η Lionel Chauvin έγραψε:
>
>> 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.
> The calendar plasmoid shows an icon with the current day number when it is in a panel.
> I want the same behavior.
>
>> for that you can just make an applet of type popupapplet, not setting the
>> compact representation and an icon will be used instead
> Yes, it is the current state of my code.
> I could try to paint a QIcon at runtime and set plasmoid.popupIcon but it sounds weird.
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
In my plasmoid I use:
property Component compactRepresentationEmpty: undefined
property Component compactRepresentationPanel: Component{
CompactRepresentation{} }
property Component compactRepresentation: plasmoidWrapper.isInPanel ?
compactRepresentationPanel :
compactRepresentationEmpty
compactRepresantationEmpty when the plasmoid is in the desktop fails, as
a result
the plasmoid does not use the compactRepresentation to show itself.
In the panel the compactRepresantationPanel is ok, so you can use any
qml appearance you
want.
To discover the isInPanel situation I use a huge hack that uses qml
pluginsbut
I dont know if that's ok with the mailing list to unleash in public that
information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130205/282a51b2/attachment.html>
More information about the Plasma-devel
mailing list