bugfix
This commit is contained in:
parent
8f461c4523
commit
66bc5c375f
41
kivycv/xcamera/xcamera.kv
Executable file
41
kivycv/xcamera/xcamera.kv
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#:import xcamera kivyblocks.xcamera.xcamera
|
||||||
|
|
||||||
|
<XCameraIconButton>
|
||||||
|
icon_color: (0, 0, 0, 1)
|
||||||
|
_down_color: xcamera.darker(self.icon_color)
|
||||||
|
icon_size: dp(50)
|
||||||
|
|
||||||
|
canvas.before:
|
||||||
|
Color:
|
||||||
|
rgba: self.icon_color if self.state == 'normal' else self._down_color
|
||||||
|
Ellipse:
|
||||||
|
pos: self.pos
|
||||||
|
size: self.size
|
||||||
|
|
||||||
|
size_hint: None, None
|
||||||
|
size: self.icon_size, self.icon_size
|
||||||
|
font_size: self.icon_size/2
|
||||||
|
|
||||||
|
|
||||||
|
<XCamera>:
|
||||||
|
# \ue800 corresponds to the camera icon in the font
|
||||||
|
icon: u"[font=data/icons.ttf]\ue800[/font]"
|
||||||
|
icon_color: (0.13, 0.58, 0.95, 0.8)
|
||||||
|
icon_size: dp(70)
|
||||||
|
|
||||||
|
id: camera
|
||||||
|
resolution: 640, 480 # 1920, 1080
|
||||||
|
allow_stretch: True
|
||||||
|
|
||||||
|
# Shoot button
|
||||||
|
XCameraIconButton:
|
||||||
|
id: shoot_button
|
||||||
|
markup: True
|
||||||
|
text: root.icon
|
||||||
|
icon_color: root.icon_color
|
||||||
|
icon_size: root.icon_size
|
||||||
|
on_release: root.shoot()
|
||||||
|
|
||||||
|
# position
|
||||||
|
right: root.width - dp(10)
|
||||||
|
center_y: root.center_y
|
Loading…
Reference in New Issue
Block a user