[PATCH] panel placement at the center (or whatever) of the screen
Aaron J. Seigo
aseigo at kde.org
Sun Mar 30 22:25:26 CEST 2008
On Sunday 30 March 2008, Marco Martin wrote:
> This patch allows a different placement for panels with a lenght < of the
> screen width (or height) to obtain something like this:
> http://www.notmart.org/misc/centerpanel.jpg
let's step back for a moment and figure out where this functionality belongs,
and what it ought to be able to do.
this is something that affects the view more than the containment itself. in
fact, we've gone to not recording geometry in the placement of containments
on the canvas at all. it would be nice to keep it that way if possible.
in your patch, there's not chekcing for the panel going off the screen, so it
would be pretty trivial for the user to end up pushing a panel into another
view. this would be particularly easy with vertical panels.
the containment needs to stay within the bounds of the screen edge. but where
it is displayed on that screen edge is really up to the view.
perhaps what we really want is an anchor point and expanding directions in
PanelView.
this is based on the following use cases:
* cenetered panel, expanding outwards in both directions
* panel "stuck" to the left edge at the top of the screen, expanding towards
the right
* panel "stuck" to the bottom edge of the left side of the screen, expanding
upwards
* panel starting at 500px and expanding to the right
* panel startting at 300px, ending at 800px
* panel start at left edge of bottom of screen, expanding to the right up to
600px
these are all things people like to do with their panels. having an offset in
the containment doesn't make it particularly easy to do, and it would require
adjusting whenver the screen size changed.
in fact, what people want to do sounds a *lot* like managing a paragraph in a
word processing document! think about it:
* left margin
* right margin
* left / right / centered / justified
our current panel would be (0, -0, justified)
a centered panel would be (0, -0, centered)
a panel starting at 500px and expanding to the right would be (500, -0, left)
a panel starting at 300, ending at 800px would be (300, min(-0 , 800 -
screenWidth), justified)
the control UI for this would need to appear in the view itself (at the edge
closest to the screen middle, or the top edge for floating views), and i
think we could just use the office icons for these things. drag the margin
handles, select the justification (those could sit in the middle between the
margin handles) .. voila.
no moving things on the canvas, natural boundaries enforced for screen edges.
so the offset in your patch would become the left margin value, but stored in
the view. and set up there as well.
--
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/20080330/3dbac9a5/attachment.pgp
More information about the Panel-devel
mailing list