1
0

kivy: share with qr code on double tap

This commit is contained in:
ThomasV
2016-02-18 12:41:05 +01:00
parent caccae222c
commit 34ddaaa419
4 changed files with 18 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ Builder.load_string('''
<QRDialog@Popup>
id: popup
title: ''
data: ''
shaded: False
AnchorLayout:
anchor_x: 'center'
@@ -13,6 +14,8 @@ Builder.load_string('''
size_hint: 1, 1
QRCodeWidget:
id: qr
TopLabel:
text: root.data
Widget:
size_hint: 1, 0.2
BoxLayout:

View File

@@ -35,9 +35,10 @@ ReceiveScreen:
width: min(self.height, bl.width)
pos_hint: {'center': (.5, .5)}
shaded: False
foreground_color: (0, 0, 0, 0.5) if self.shaded else (0, 0, 0, 0)
on_touch_down:
self.shaded = not self.shaded
self.foreground_color = (0, 0, 0, 0.5) if self.shaded else (0, 0, 0, 0)
touch = args[1]
if self.collide_point(*touch.pos): self.shaded = not self.shaded
Label:
text: root.status
opacity: 1 if root.status else 0
@@ -52,7 +53,6 @@ ReceiveScreen:
pos: self.pos
size: self.size
SendReceiveBlueBottom:
id: blue_bottom
size_hint: 1, None