Review Request: Manual panel hiding [WIP]

Aaron J. Seigo aseigo at kde.org
Wed Aug 18 18:29:56 CEST 2010


On Tuesday, August 17, 2010, Will Stephenson wrote:
> If the hide buttons would be qwidgets, but we want to have the right
> themeing, would this make them Plasma::Toolbuttons drawn on separate Views
> as QWidgets?

it can probably be a lot simpler than that even...

we have a themed QToolButton in libplasmagenericshell called ToolButton. we 
can (and do) use those as regular ol' QWidgets.

then there is PanelView in desktop/shell/panelview.h which is a QWidget as 
well, and the PanelView class does the hide/show management.

so when it is set to manual hiding, PanelView could create a ToolButton and 
place it as a child QWidget. it could set a contents margin on itself to make 
room for it, and then the containment will naturally be adjusted to fit that. 
some of the calculations for things like "maximize panel" may require some 
adjustments as a result, unless they are already based on contentsRect() 
rather than just size().

so in this case it's really just typical QWidget based development and there 
isn't really any special Plasma / QGraphicsView voodoo needed :)

-- 
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 Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100818/f2972ad1/attachment.sig 


More information about the Plasma-devel mailing list