On Fri, Feb 26, 2010 at 6:57 PM, Aaron J. Seigo <ase...@kde.org> wrote:
> On February 26, 2010, Antony Loebs wrote: > > Two problems: one, I don't see how to make a click on a label register, > > and two, while it looks fine on the desktop, if it is started in the > panel > > it is squashed horizontally (so the image looks like a vertical line > about > > four or five pixels wide). Additionally, when I rescale the panel, the > > image scales vertically, but not horizontally. > > sounds like a layouting issue; you probably need to set a preferred and/or > minimum size in your widget. > > remember that panels can be very small, however. it's never fun when a > widget > enforces a minimum size that's overly large. :) > > Ok, when I added self.layout.setPreferredWidth(120) that displays it correctly, but now it doesn'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? > --- > > import subprocess > > > > self.button = Plasma.Label(self.applet) > > self.button.setImage(self.package().path() + "contents/images/image.png") > > that should be: self.package().filePath("images", "image.png") > 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.) Also, I still can't get clicks on the label to register with self.connect(self.button, SIGNAL("linkActivated()"), self.notify) Any hints? Thanks in advance!
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel