From kde-core-devel Wed Mar 29 16:45:05 2000 From: m_elter () t-online ! de (Matthias Elter) Date: Wed, 29 Mar 2000 16:45:05 +0000 To: kde-core-devel Subject: Re: kpanelapplet.h X-MARC-Message: https://marc.info/?l=kde-core-devel&m=95434880527471 Graham TerMarsch wrote: > > Matthias Elter wrote: > > Matthias Ettrich wrote: > > > The only benefit I see are the heightForWidth() and widthForHeight() functions. > > > What's the purpose of KPanelApplet? Or better: what's wrong with KApplet that > > > can't be fixed? > > > > Simplified API plus a KApplet never knows what size it actually will be > > granted, a KPanelApplet does. > > Brings up the question, though, as to what happens if a KPanelApplet wants > to resize itself? For example, I've got a themed clock applet that I've > been working on here and the biggest issue that I have at the moment is > that as a KApplet it can't resize itself and have the new size recognized > by Kicker. Doesn't happen often, but each time a new theme is selected the > size of the clock changes. Does KPanelApplet address this issue as well? A quote from kpanelapplet.h: /** * Notify the panel about a new applet layout. * * Call this to make the panel relayout all applets, when * you want to change your width (horizontal panel) or * height (vertical panel). * * The panel is going to relayout all applets based on their * widthForHeight(int height) (horizontal panel) or * heightForWidth(int width) (vertical panel). * * Please note that the panel may change the applets location * if the new widthForHeight(int height) (horizontal panel) or * heightForWidth(int width) (vertical panel) does not fit into the * current panel layout. **/ void updateLayout(); -- Matthias Elter elter@kde.org me@caldera.de