Notification applet needs and questions

aseigo at bddf.ca aseigo at bddf.ca
Fri May 23 17:44:31 CEST 2008


> Well, Notify applet is a little different here, because it needs not only
> to set some
> initial size, but also expand/collapse itself as long as new notifications
> arrive or
> some existing ones vanish.
>
> The question is: how well is plasma prepared for such behaving applets?

shouldn't be a problem; to behave nicely, however, the applet should at
least try and respect the user's wishes as well as give them clues.

setting the minimum size of the applet will prevent users from being able
to shrink it too small with the applet handle resize tool, for instance.

also, if the user expands the widget to be bigger than is needed, the
notify applet should respect that and not make it smaller again.
a Containment that can be showed in a toplevel View.

> Applet class (and thus Containment) has geometryChanged() signal, but it's
> emmitted
> only in Applet::setGeometry() which is marked as "should not be called by
> subclasses!". So 1) calling resize() isn't noticed by View

the problem here is pretty easily solved i think: Applet::setGeometry
needs to be replaced with a resizeEvent and a moveEvent reimplementation
that emits the change signal, sets up the constraints event update and
resizes the background.

> 2) apparently -
> calling
> setGeometry() instead of resize() screws sizing for some reason.

actually, resize calls setGeometry internally. =)

> Another big question is that when I show my notifications containment in a
> view and
> when it changes size, i obviously need View to change its size too. But no
> code for
> this exists in View.

    /**
     * Set whether or not the view should adjust its size when the associated
     * containment does.
     * @arg trackChanges true to syncronize the view's size with the
containment's
     * (this is the default behaviour), false to ignore containment size
changes
     */
    void setTrackContainmentChanges(bool trackChanges);





More information about the Panel-devel mailing list