-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsgbox.kv
80 lines (69 loc) · 1.82 KB
/
msgbox.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
67
68
69
70
71
72
73
74
75
76
77
78
79
#:kivy 2.0.0
<ModalBox>:
_container: container
title_size: sp(14)
GridLayout:
padding: dp(10)
cols: 1
size_hint: None, None
pos: root.pos
size: root.size
#
# Title box
#
BoxLayout:
id: title_box
size_hint: 1, None
height: dp(32)
Label:
id: title
text: root.title
color: root.title_color
size_hint_y: None
height: self.texture_size[1] + dp(8)
text_size: self.width - dp(8), None
font_size: root.title_size
font_name: root.title_font
bold: True
halign: 'left'
AwesomeActionButton:
text: root.close_text
on_release: root.dismiss()
halign: 'right'
size_hint_x: None
width: self.texture_size[0] + dp(14)
#
# Separator
#
Widget:
size_hint_y: None
height: dp(4)
canvas:
Color:
rgba: root.separator_color
Rectangle:
pos: self.x, self.y + root.separator_height / 2.
size: self.width, root.separator_height
#
# Content
#
BoxLayout:
id: container
<MessageBoxLayout>:
_box: box
_buttons: buttons
_message: message
cols: 1
rows: 2
BoxLayout:
id: box
FontScalingLabel:
id: message
markup: True
text_size: self.width if self.auto_wrap else None, None
max_font_size: sp(18)
halign: 'center'
background: 0,0,0,0
BoxLayout:
id: buttons
size_hint: 1, .35