What is the preferred way to create rounded corners for buttons in kivy?
Are there other equally viable ways to perform this task? Thank you.
If you are looking only for good looks, and aren't picky about the corners, though rounded, are still touch points, you can do it simply, as shown in this sample program (This has large radius for this sample):
from kivy.uix.button import Button
from kivy.lang import Builder
from kivy.base import runTouchApp
kv="""
:
background_color: 0,0,0,0 # the last zero is the critical on, make invisible
canvas.before:
Color:
rgba: (.4,.4,.4,1) if self.state=='normal' else (0,.7,.7,1) # visual feedback of press
RoundedRectangle:
pos: self.pos
size: self.size
radius: [50,]
"""
class RoundedButton(Button):
pass
Builder.load_string(kv)
runTouchApp(RoundedButton(text="Hit Me!"))