[PATCH] panel placement at the center (or whatever) of the screen

Aaron J. Seigo aseigo at kde.org
Mon Mar 31 17:13:48 CEST 2008


On Monday 31 March 2008, Marco Martin wrote:
> still can't figre out how to do it, the containment would pass the config
> group to the view or what?

no, the view would keep it's own config.

> don't know, it seems way more natural to me fetching the configuration from
> the containment,

but this information doesn't belong to the containment. it's view, not model.

> if only there was a way for the containment to talk to the 
> view (why view() called from the panel containment returns 0 by the way?)

"containment $SOMETHING the view" is a broken concept. we fudge it for certain 
cases (systray, tooltip popups) but every time we do that we break the 
model/view concept.

> another thing: i think with your proposal we could end up with a broken
> configuration like this: (1024, -0, left) with a screen resolution of
> 1024x768 so the panel starts from 1024 end expand to the right, so could
> either become wide 0 pixels or being forcefully moved to the left until
> there is enough room.

yes, when screen resolution changes, some bounds checking would need to occur.

> i've tought to a slightly different behaviour that both avoids that
> problems

it doesn't, actually, since the min/max could also become too big on screen 
resize. you still need to do sanity checks.

> and there could be a slick minimalistic configuration interface in 
> the future, a mockup of how the (in)famous panel toolbox is here:
> http://www.notmart.org/misc/panel-resize-mock.png
> we have a new value, i would call it pivot (the white triangle in the
> mockup) that could be either an x coordinate or a double between 0 and 1
> (maybe in this way it would behave better if the panel is moved from a
> screen to another) a minimum size and a maximum size (green and red signs,
> they move symmetrically when dragged).
> the panel would always be placed and expanding according to the pivot
> value, so for instance if the pivot is at the left screen edge the panel
> will expand to the right, if the pivot is at center it would expand equally
> from the left and  the right ad the panel is centered. if the pivot is at
> one third the panel is at one third of the screen and expands one third to
> the left and two thirds to the right.

the interface is very similar to what i've been envisioning as far as 
simplicity, visual coolness and what not ... however, i think the pivot point 
is a pretty complex concept. is it really necessary to have more than "expand 
left, right, centered or fully justified"? i'm trying to think of a useful 
situation where it expands in both directions but not equally.

i like the min/max size thing though, that looks slick.

> > yes, there should be a minimum size set in PanelContainment.
>
> maybe size of a small icon + margins? or the sum of the minumum size of
> every applet it contain?

the latter if it has applets, yes.

-- 
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: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080331/e2965c10/attachment-0001.pgp 


More information about the Panel-devel mailing list