blob: d93f8531ca423674b0b7472e52b8426af6c0ab2a (
plain)
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
|
"""Dialogue to show an error message.
Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2022
"""
# kivy imports
from kivy.lang import Builder
import kivy.properties as kp
# inner-module imports
from .dialogue import Dialogue
# exports
__all__ = ('Error', )
## code ##
# load kv
Builder.load_string('''
<Error>:
text: ''
ok_on_enter: False
DialogueContentNoTitle:
Label:
markup: True
text: root.text
size_hint_y: None
color: 1, 0, 0, 1
height: self.texture_size[1] + dp(16)
text_size: self.width - dp(16), None
halign: 'center'
DialogueButtons_One:
''')
# classes
class Error(Dialogue):
"""Error message."""
text = kp.StringProperty('')
## EOF ##
|