The {roundrect} macro allows you to quickly and easily create rounded rectangles
There are times when you want to put a box around some content but want that box to have rounded corners, this macro allows you to do that.
This macro is used as shown below:
{roundrect:title=myTitle}body content{roundrect}
Parameters
Parameter
Default
Required
Notes
bgcolor
#C0FFC0
The background colour of the rounded rectangle, this should be specified as a hex value
title
The contents of the title cell, if required
footer
The contents of the footer cell, if required
width
fit contents
By default, the panel width will stretch to fit it's contents, unless you specify a specific width
height
fit contents
By default, the panel height will stretch to fit it's contents, unless you specify a specific height
cornersize
25px
The radius, in pixels, of the panel corners. This sets the defaults for the hSize and vSize parameters below.
hSize
cornersize
This parameter, which defaults to the value defined by cornersize, defines the width of the panel corners.
vSize
cornersize
This parameter, which defaults to the value defined by cornersize, defines the height of the panel corners.
antialias
false
Setting the antialias parameter will result in much smoother corners and enable the cornercolor parameter
footerbgcolor
bgcolor
The background colour of the footer area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value
titlebgcolor
bgcolor
The background colour of the title area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value
corners
true,true,true,true
a comma separated list of flags stating which corners should be rounded: Top Left, Top Right, Bottom Left, Bottom Right
rows
true,true,true
a comma separated list of flags stating which rows should be displayed: Top, Middle, Bottom
rows
a list of classes to be applied to the roundrect table
This plug-in is available without cost for both commercial and non-commercial purposes. However, if you have found it to be useful, particularly within a commercial environment, please consider making a donation to the author. This will encourage continued development of this and other plug-ins, as well as speeding up the response for your latest maintenance request.
If you wish to donate, it can be done easily with a credit card or bank transfer using PayPal. No account sign-up is required for credit or debit card payments.
This macro has been tested by Adaptavist with Confluence 2.1.2
It is usually pre-installed with Builder accounts. To install it on your own Confluence installation, please see Content Formatting Macros
Adaptavist maintain a JIRA Project for tracking bug reports and feature requests for this macro. The currently reported items are shown below:
jiraissues: Could not download[ http://jira.adaptavist.com/secure/IssueNavigator.jspa?view=rss&pid=10080&component=10210&statusIds=1&statusIds=3&statusIds=4&statusIds=5&sorter/field=updated&sorter/order=DESC&tempMax=25&reset=true&decorator=none] : caused by : Circular redirect to 'http://jira.adaptavist.com:80/secure/IssueNavigator.jspa'
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.
Setting cornersize
You may define the radius of the curved corners using the cornersize property
Setting the antialias property to true uses a different kind of image to ensure that the edges of the corner have been antialiased (jagged edges removed).
For the technically minded the aliased gif images are replaced by a single swf file that knows how to rotate and color itself.
Setting cornercolor
Setting the antialias property to true also enables the cornercolor property which allows you to create round rectangles on top of non-white backgrounds
You can control the color of the text within round rectangles, as well as the alignment of content within the header, body and footer areas using the following css.
If you're using the [Builder Theme] just add it to the CSS Custom Styles setting in theme config. Alternatively, you can use the style macro on the page where you have the roundrect.
You can probably already do this using CSS - if you view the HTML source you'll see the class names we've added to pretty much each bit of markup within the roundrect and can use that to add CSS specifying the bg image. However, the corners would likely not be round if you added a bg image to the entire table as the default is to have transparent corners rather than simply overlaying with white gifs.
Where do I add the CSS?
If you're using the [Builder Theme] just add it to the CSS Custom Styles setting in theme config. Alternatively, you can use the style macro on the page where you have the roundrect.
bgimage property would be really useful in this macro, enabling users to create nice-looking buttons
You can probably already do this using CSS - if you view the HTML source you'll see the class names we've added to pretty much each bit of markup within the roundrect and can use that to add CSS specifying the bg image. However, the corners would likely not be round if you added a bg image to the entire table as the default is to have transparent corners rather than simply overlaying with white gifs.
Why do I have problems rendering antialiased rectangles ? (Is it normal?)
Thanks !