Archived
1
0
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.
luminotes/view/Rounded_div.py
Dan Helfman 98a0ee228a No more rounded corners on many UI elements, since the rounding was done by a
browser-specific CSS hack and looked crappy. Those elements that are still
rounded are now implemented with nice smooth images instead.

Also changed downloaded HTML generation to specify sans-serif for the font.
2007-10-31 07:46:02 +00:00

27 lines
550 B
Python

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,
class_ = u"%s_color" % image_name,
)