fix #1174 Refactoring border-radius property for widgets

Adding a macro to refactor the code for the border-radius property.