Hi Omri,

it shouldn't be necessary to recalculate the border-radius value. Just 
set it to some impossibly large value and as long as the element is a 
square, the browser should always draw a circle.


Regards,
Daniel

On 07/20/2012 09:48 AM, omrihar wrote:
> Hi,
>
> I'm trying to create a label like widget which will have a circle painted
> around it.
> I want to use it to add a small circle with a number on it to an existing
> widget.
> This is very easy to achieve in CSS by creating an element with width=height
> and
> a radius which is equal to half the height or width. I am trying to create a
> widget
> with a label, whose height is bound to its width so that they are both
> equal. My problem
> is that I'm not sure how I'm supposed to create the border with half the
> radius.
>
> I tried creating a decorator in the decoration theme, which includes the
> qx.ui.decoration.MBorderRadius and qx.ui.decoration.MSingleBorder mixins,
> but in all the examples I found for the decorations, the radius set is
> fixed, and independent
> of the other properties of the widget. Is there a way to access these
> properties
> from the decoration theme? Is this a good approach to achieving what I'm
> trying to
> achieve?
>
> Cross-browser compatibility is not extremely important, since I restricted
> the people
> using my program to either FF or Chrome.
>
> Thanks,
> Omri
>
>
>
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/Creating-a-circle-around-a-label-using-decorators-tp7580683.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to