[Review board] a feature and some cleanups in PanelSvg

Marco Martin notmart at gmail.com
Thu Jul 24 12:58:18 CEST 2008


http://reviewboard.vidsolbach.de/r/100/

those are some changes i would like to make in the PanelSvg class.

(pasted from rb message)
* add the ability to set custom margins in PanelSvg: now they were bounded to 
the size of the borders part of the svg, and this is usually ok, but 
sometimes it causes a too big (or too little) margin than the desired one. An 
use case is the tabbar (see the two screenshots) where the background 
represents a kins of hole, so the border part has also a shadow that is done 
to be under the content and not being a margin. now it's checked for the 
presence of hints (like hint-right-margin), and if not found the old method 
is used.

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)

* hint-no-border-padding: this becomes somewhat redundant with the custom 
margins (and way less useful) and i don't think there are themes that 
actually uses it, i think that really could be removed

* paintPanel API: that double parameter rect+pos never worked really well, 
giving a custom rectonly deforms the resulting pixmap in an ugly way and the 
topLeft of the rect and the pos somewhat clashes.
now in this patch i just make it to ignore the rect parameter and all things 
that uses panelsvg still work without problems, even if it's a painful 
process i would like to change the api (this earlier is done the better is)

Cheers,
Marco Martin


More information about the Plasma-devel mailing list