[Review board] a feature and some cleanups in PanelSvg

Marco Martin notmart at gmail.com
Thu Jul 24 14:37:39 CEST 2008


whooops, at the first attempt i still sent sent it to panel-devel :D

On Thursday 24 July 2008, Marco Martin wrote:
> http://reviewboard.vidsolbach.de/r/100/
>

> unrelated things:
> * contentAtOrigin: there was no way to set it to true, so was dead code. in
> what cases was this thing designed to be used by the way? (i see it could
> be somewhat useful for button glow, is it worth to resuscitate it and put a
> proper hint element for that? i think i'll give a try)

about contentAtOrigin: i've made some exeriments on enabling it and maybe it 
causes more problems than it solves.
the contentAtOrigin basically makes the panel size to be the size of the 
center elements, so the resulting pixmap will be bigger and the borders will 
be painted outside the area usually covered used by it. this makes very 
tricky to paint on temporary images, because there is no way to know what the 
real size would be, so the panel will result cutted on the too little pixmap.
so we would need some functions that take this into account, like a 
realPanelSize() and an isContentAtOrigin()
very useful for animations (and that would solve the problem by itself) would 
also be a function that returns a copy of the cached pixmap, i had really too 
many times to use a temporary painter on a pixmap (how are comparable costs 
of copying a qpixmap and painting one into another?)
again, worth the effort? not much for the code that i have it more or less 
working but as a balance of the complexity on how panelsvg is used

Cheers,
Marco Martin




More information about the Plasma-devel mailing list