<br><br><div class="gmail_quote">On Fri, Feb 26, 2010 at 6:57 PM, Aaron J. Seigo <span dir="ltr">&lt;<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On February 26, 2010, Antony Loebs wrote:<br>
&gt; Two problems: one, I don&#39;t see how to make a click on a label register,<br>
&gt; and two, while it looks fine on the desktop, if it is started in the panel<br>
&gt; it is squashed horizontally (so the image looks like a vertical line about<br>
&gt; four or five pixels wide). Additionally, when I rescale the panel, the<br>
&gt; image scales vertically, but not horizontally.<br>
<br>
</div>sounds like a layouting issue; you probably need to set a preferred and/or<br>
minimum size in your widget.<br>
<br>
remember that panels can be very small, however. it&#39;s never fun when a widget<br>
enforces a minimum size that&#39;s overly large. :)<br>
<br></blockquote><div> Ok, when I added<br>self.layout.setPreferredWidth(120)<br>that displays it correctly, but now it doesn&#39;t expand or contract at all horizontally. It does expand and contract vertically, however. What should I add so that the height and the width of the image scale relative to each other?<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
&gt; ---<br>
&gt; import subprocess<br>
&gt;<br>
&gt; self.button = Plasma.Label(self.applet)<br>
&gt; self.button.setImage(self.package().path() + &quot;contents/images/image.png&quot;)<br>
<br>
</div>that should be: self.package().filePath(&quot;images&quot;, &quot;image.png&quot;)<br></blockquote><div> <br>When I do that, I get a big red button with a white X. (This is using 4.4.1-0ubuntu1 on Kubuntu Lucid, just upgraded today.)<br>
</div></div><br>Also, I still can&#39;t get clicks on the label to register with <br>self.connect(self.button, SIGNAL(&quot;linkActivated()&quot;), self.notify)<br>Any hints?<br><br>Thanks in advance!<br>