[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Panel extension api
From:       Matthias Elter <me () ns ! caldera ! de>
Date:       2000-11-01 11:08:55
[Download RAW message or body]

On Tue, Oct 31, 2000 at 07:49:36PM +0000, Richard Moore wrote:
> I've been looking at the new extension api with a view to porting
> KasBar and I have a bit of a problem. The api seems to be written
> with a view to extensions which dock to the screen edge, but it
> is unclear to me how to handle an extension like kasbar which
> docks to the corners of the screen. How am I supposed to handle
> this within the framework?

Ok, extensions living in the corners are supported, too. The extension manager will ask your \
extension for a preferred size via QSize sizeHint(Position p, QSize maxsize). So for a given \
Position like left, your extension can choose it's size but is limited to the maxsize provided \
by the manager. With your kasbar on the left, you simply return a size with the height you \
need, it does not have to be the full height. You will most likely have it depend on the number \
of task buttons shown in the kasbar. When you add/remove task buttons you have to tell the \
extension manager that your preferred size has changed byt emitting updateLayout(). The manager \
will query the preferred size again and resize the extension.

So far the theory. I have not tested corner only extensions yet. However the external taskbar \
should be corner only in vertical mode, too. I'm going to implement it for the taskbar today \
and you can use that as demo code if you want. But you can also try it from scratch as it \
should be simple.

Bye,
Matthias


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic