我定义了一个平滑按钮,在所有组件中都将其用作按钮:
<SmoothButton@Button>:
background_color:(0,0,0,0)
background_normal:''
back_color: (0.565, 0.557, 0.698,0.8)
border_radius:[0,35,0,35]
font_name:'Comic'
canvas.before:
Color:
rgba:self.back_color
RoundedRectangle:
size:self.size
pos:self.pos
radius:self.border_radius
注意,这里唯一的收获是:
border_radius:[0,35,0,35]