forked from ryandoherty/RaceCapture_App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iconbutton.kv
66 lines (61 loc) · 1.87 KB
/
iconbutton.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<RoundedRect>:
line_width: (self.height * 0.15) + 1
radius: self.height * 0.007
canvas:
Color:
rgb: self.rect_color
Line:
rounded_rectangle: (self.x + (self.line_width), self.y + (self.line_width), self.right - self.x - self.line_width * 2, self.top - self.y - self.line_width *2, self.radius)
width: self.line_width
Rectangle:
pos: (self.x + self.line_width, self.y + self.line_width)
size: (self.width - self. line_width*2, self.height - self.line_width * 2)
<TileIconButton>:
RoundedRect:
rect_color: root.tile_color
BoxLayout:
orientation: 'vertical'
Label:
id: icon
font_name: 'resource/fonts/fa.ttf'
color: root.icon_color
size_hint_y: 0.7
font_size: self.height * 0.7
text: root.icon
Label:
id: label
font_name: root.title_font
font_size: self.height * 0.4
color: root.title_color
size_hint_y: 0.3
text: root.title
<LabelIconButton>:
RoundedRect:
rect_color: root.tile_color
BoxLayout:
orientation: 'horizontal'
padding: (dp(8), 0)
spacing: dp(8)
Label:
id: icon
size_hint_x: 0.25
font_name: 'resource/fonts/fa.ttf'
color: root.icon_color
font_size: root.icon_size
text: root.icon
Label:
id: label
valign: 'middle'
halign: 'left'
text_size: (self.width, None)
font_name: root.title_font
font_size: root.title_font_size
color: root.title_color
size_hint_x: 0.75
text: root.title
<IconButton>:
background_color: [0, 0, 0, 0]
background_down: ''
font_size: self.height
color: [1.0, 1.0, 1.0, 0.8]
font_name: 'resource/fonts/fa.ttf'