[Panel-devel] Desktop Icons Patch
Aaron J. Seigo
aseigo at kde.org
Wed Dec 19 15:53:02 CET 2007
On Wednesday 19 December 2007, Marco Martin wrote:
> the minimum size of the icon is too big for the panel
> and the applet should have an expandingdirections 0 otherwiseit eats all
> the available space in a boxlayout
this:
setMinimumContentSize(QSize(48,78));
should probably be based on the height() of the font that will be used?
> this patch should address these issues, in particular i made the
> minimumcontentsize dependent from the containment, because in the panel the
> icon doesn't have text (->different aspect ratio) and it should still be
> possible to have a very tiny panel like 16 pixels or so.
ineed.
> i think it should be done to every applet that uses an icon widget (move it
> down to icon widget?)
some of it will need to, yes.
> it still has the problem of the elided text that i feel it's kinda
> connected with this one, i think the aspect ratio of the icon should change
> upon resizing to make enough room for at least 15-16 characters, but i
> still don't know how to do it
ok, this part belongs in the applet. basically what you want to do is in
constraintsUpdated you will want to respond to (constraints & SizeConstraint)
and calculate a new width based on the height.
you can either set the new width right there or use contentSizeHint. either
way, you need to be careful not to create an infinite loop: changing the size
may well cause another call to constraintsUpdated for SizeConstraint; so the
calculation needs to be stable (always returning the same width for the same
height)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071219/b67cf90a/attachment-0001.pgp
More information about the Panel-devel
mailing list