我想更改 ActionBar 中 ActionOverflow 内的 ActionButtons 的背景,但是使用按钮的常用方法(background_down、background_normal)似乎不起作用。
[黑色背景的ActionButton] ( https://raw.githubusercontent.com/Thomas-Adams/kivy_mananger/master/color_mananger/kivy-actionbutton.png )
奇怪的是,当我单击那个特定的 ActionButton(例如“List”)时,背景会根据需要发生变化。然而,“正常”未按下状态仍然具有黑色背景。我也尝试篡改背景图像属性,但无济于事。我想念什么?有人对此有任何线索或暗示吗?
#:import get_color_from_hex kivy.utils.get_color_from_hex
<MainView>:
...
ActionButton:
canvas.before:
Color:
rgba: get_color_from_hex('#d500f9')
Rectangle:
size: self.size
pos: self.pos
background_normal: 'electric-violet.png'
background_down: 'electric-violet-lighten.png'
background_disabled: ''
background_disabled_down: ''
background_color: get_color_from_hex('#d500f9')
text: 'Create'