mirror of https://github.com/kivy/kivy.git
actionbar: expose ActionToggleButton in the documentation, and share the same style as ActionButton.
This commit is contained in:
parent
508825b826
commit
38668a4ea3
|
@ -534,7 +534,7 @@
|
|||
size: self.width, self.height - sp(8)
|
||||
source: self.background_image
|
||||
|
||||
<ActionButton>:
|
||||
<ActionButton,ActionToggleButton>:
|
||||
background_normal: 'atlas://data/images/defaulttheme/' + ('action_bar' if self.inside_group else 'action_item')
|
||||
background_down: 'atlas://data/images/defaulttheme/action_item_down'
|
||||
size_hint_x: None if not root.inside_group else 1
|
||||
|
@ -552,9 +552,6 @@
|
|||
size_hint_x: None
|
||||
width: self.texture_size[0] + dp(32)
|
||||
|
||||
<ActionToggleButton>:
|
||||
background_normal: 'atlas://data/images/defaulttheme/action_bar' if self.inside_group else 'atlas://data/images/defaulttheme/action_item'
|
||||
|
||||
<ActionCheck>:
|
||||
background_normal: 'atlas://data/images/defaulttheme/action_bar' if self.inside_group else 'atlas://data/images/defaulttheme/action_item'
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@ subclasses of :class:`ActionItem`. Some of predefined are
|
|||
__all__ = ('ActionBarException', 'ActionItem', 'ActionButton',
|
||||
'ActionToggleButton', 'ActionCheck', 'ActionSeparator',
|
||||
'ActionDropDown', 'ActionGroup', 'ActionOverflow',
|
||||
'ActionView', 'ContextualActionView', 'ActionBar')
|
||||
'ActionView', 'ContextualActionView', 'ActionPrevious',
|
||||
'ActionBar')
|
||||
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivy.uix.dropdown import DropDown
|
||||
|
@ -175,7 +176,12 @@ class ActionPrevious(ActionButton):
|
|||
class ActionToggleButton(ActionItem, ToggleButton):
|
||||
'''ActionToggleButton class, see module documentation for more information.
|
||||
'''
|
||||
pass
|
||||
|
||||
icon = StringProperty(None, allownone=True)
|
||||
'''Source image to use when the Button is part of the ActionBar. If the
|
||||
Button is in a group, the text will be preferred.
|
||||
'''
|
||||
|
||||
|
||||
|
||||
class ActionCheck(ActionItem, CheckBox):
|
||||
|
|
Loading…
Reference in New Issue