This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
2007-10-31 07:46:02 +00:00
|
|
|
from Tags import Div
|
|
|
|
|
|
|
|
|
|
|
|
class Rounded_div( Div ):
|
|
|
|
def __init__( self, image_name, *args, **kwargs ):
|
|
|
|
# if no corners were specified, assumed all corners should be rounded
|
|
|
|
corners = kwargs.pop( "corners", [] )
|
|
|
|
if len( corners ) == 0:
|
|
|
|
corners = ( u"tl", u"tr", u"bl", u"br" )
|
|
|
|
|
|
|
|
div = Div(
|
|
|
|
*args,
|
|
|
|
**kwargs
|
|
|
|
)
|
|
|
|
|
|
|
|
for corner in corners:
|
|
|
|
div = Div(
|
|
|
|
div,
|
|
|
|
class_ = u"%s_%s" % ( image_name, corner ),
|
|
|
|
)
|
|
|
|
|
|
|
|
Div.__init__(
|
|
|
|
self,
|
|
|
|
div,
|
2008-10-09 19:53:57 +00:00
|
|
|
id = u"%s_wrapper" % ( kwargs.get( u"id" ) or image_name ),
|
2007-10-31 07:46:02 +00:00
|
|
|
class_ = u"%s_color" % image_name,
|
|
|
|
)
|