[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: QML plasmoid and compact representation
From:       Michail Vourlakos <mvourlakos () gmail ! com>
Date:       2013-02-05 12:31:10
Message-ID: 5110FB8E.5020205 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Στις 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@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.

[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-7"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Στις 04/02/2013 09:36 μμ, ο/η Lionel
      Chauvin έγραψε:<br>
    </div>
    <blockquote
      cite="mid:1360006570.22549.YahooMailNeo@web171806.mail.ir2.yahoo.com"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">
The calendar plasmoid shows an icon with the current day number when it is in a \
panel. I want the same behavior.

</pre>
      <blockquote type="cite">
        <pre wrap="">for that you can just make an applet of type popupapplet, not \
setting the  compact representation and an icon will be used instead
</pre>
      </blockquote>
      <pre wrap="">
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
<a class="moz-txt-link-abbreviated" \
href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a> <a \
class="moz-txt-link-freetext" \
href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a>


</pre>
    </blockquote>
    <font size="+1"><font face="Arial">In my plasmoid I use:<br>
        <br>
        <font size="+1">    property Component
          compactRepresentationEmpty: undefined<br>
              property Component compactRepresentationPanel: Component{
          CompactRepresentation{} }<br>
          <br>
              property Component compactRepresentation:
          plasmoidWrapper.isInPanel ?<br>
                                                           
          compactRepresentationPanel :<br>
                                                           
          compactRepresentationEmpty</font><br>
        <br>
        <font size="+1"><font size="+1">c</font>ompa<font \
size="+1">ctRepresantationEmpty  when the plasmoid i<font size="+1">s in the desktop \
fails<font  size="+1">, as a result<br>
                <font size="+1">the plasmoid does not use the c<font
                    size="+1">om<font size="+1">pactRe<font size="+1">presentation
                        t<font size="+1">o show itself.<br>
                          <br>
                          <font size="+1">In the panel the
                            compactRepresantationPanel is ok, so you can
                            use any qml appearance you <br>
                            <font size="+1">want.<font size="+1"><br>
                                <br>
                                T<font size="+1">o discover the
                                  isInPanel situation I use a huge hack
                                  that uses qml plugin<font size="+1">s<font
                                      size="+1"> <font size="+1">but<br>
                                        <font size="+1">I dont know if
                                          that<font size="+1">'s ok with
                                            the mailing list to unleash
                                            in publi<font size="+1">c th<font
                                                size="+1">at infor<font
                                                  \
                size="+1">mation.</font></font></font></font></font><br>
                                      \
</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>
  </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic