我一直在将图像居中放置在按钮内,但是当我使用center_x
和center_y
时,我意识到当我改变窗口的大小时,它会改变不透明度。有可能避免这种行为吗?
BoxLayout:
size_hint:(1,0.2)
Button:
id: start
background_normal: 'assets/normal.png'
background_down: 'assets/pressed.png'
on_release: root.start_clicked()
Image:
id:alpha
source: 'assets/menu_start.png'
opacity: 1.2
size:153,34
center_x: self.parent.center_x
center_y: self.parent.center_y
allow_stretch: True