decoration.h | [was: Review Request for KDecoration]
mgraesslin at kde.org
Thu Nov 6 12:58:24 GMT 2014
On Thursday 06 November 2014 13:31:57 Thomas Lübking wrote:
> Use QMargins here as well (they'll usually be required together)?
> QMargins as well?. Also maybe "resizeOnlyBorder"? (extendedBorder is very
will look into those two.
> is this "titleBarRect" or "captionRect" - and should the name be more
> specific? (And if it points an entire section to allow vertical titles etc.
> would a Qt::WindowFrameSection make more sense?)
It's the "titleBarRect" - buttons and caption. The idea is to have the backend
know which are is the titlebar, so that it can react on mouse clicks
accordingly. While writing this I realize that it might not be needed at all.
> As this is supposed to be only invoked from the framework, make private to a
> friend class/function?
yes I thought about that as well when writing the code. But I didn't find a
class to friend with. The framework part is hidden from the decoration and
thus difficult to friend ;-) Of course one could go through the Bridge, but
I'm not sure whether it's a real improvement. And even Qt has internal public
> w/o having looked at the paint system, but assuming it operates on
> translation and clip"region"(rect), maybe explicitly hand the rect for this
> pass to be painted as paramenter?
yes that might be an option. Do you think that Decorations could benefit from
> rename to "requestToggleMaximize|ization"?
> What's that supposed to be at all? "Decoration" will not point a single tile
> of the Decoration, does it?
It's the replacement for what used to be mousePosition() in Kdecoration1. That
is on a mouse event the Decoration updates the windowFrameSection so that the
framework can show the correct cursor. Which goes back to what I wrote above:
the titleBarRect might not be needed as it can be derived from this property
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel