1
0

kivy: add context menus

This commit is contained in:
ThomasV
2015-12-12 16:54:32 +01:00
parent 06eb3142c4
commit 6bd37723d3
8 changed files with 129 additions and 88 deletions

View File

@@ -187,6 +187,34 @@
size: self.size
pos: self.pos
<xxCardItem@ToggleButtonBehavior+GridLayout>
canvas.before:
Color:
rgba: 0.192, .498, 0.745, 1 if self.state == 'down' else 0
Rectangle
size: self.size
pos: self.x, self.y + dp(5)
padding: '2dp', '2dp'
spacing: '2dp'
height: self.minimum_height
<CardItem@ToggleButtonBehavior+BoxLayout>
size_hint: 1, None
height: '65dp'
group: 'requests'
padding: dp(12)
spacing: dp(5)
screen: None
on_release:
self.screen.show_menu(args[0]) if self.state == 'down' else self.screen.hide_menu()
canvas.before:
Color:
rgba: (0.192, .498, 0.745, 1) if self.state == 'down' else (0.3, 0.3, 0.3, 1)
Rectangle:
size: self.size
pos: self.pos
<AddressSelector@BlueSpinner>
icon: 'atlas://gui/kivy/theming/light/globe'
values: [] #app.wallet.addresses() if app.wallet else []
@@ -388,14 +416,6 @@ BoxLayout:
font_size: '22dp'
minimum_width: '1dp'
ActionButton:
id: context_button
text: app.context
width: 0
on_text:
self.width = 20 if self.text else 0
on_release: app.context_action()
ActionOverflow:
id: ao
ActionOvrButton: