comparison cagou/kv/root_widget.kv @ 208:c5c1dd7f88e1

root widget: improved notes: - fixed size/text_size - shorten note when necessary - don't erase notes anymore when more that 10 are available
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 12:06:08 +0200
parents a8190aecdd79
children cf61a011f731
comparison
equal deleted inserted replaced
207:a8190aecdd79 208:c5c1dd7f88e1
21 # size_hint: None, None 21 # size_hint: None, None
22 # size: self.texture_size 22 # size: self.texture_size
23 23
24 <Note>: 24 <Note>:
25 text: self.message 25 text: self.message
26 text_size: self.parent.size if self.parent else (100, 100)
27 halign: 'center'
28 padding_x: dp(5)
29 shorten: True
30 shorten_from: 'right'
26 31
27 <NoteDrop>: 32 <NoteDrop>:
28 canvas.before: 33 canvas.before:
29 BorderImage: 34 BorderImage:
30 pos: self.pos 35 pos: self.pos
31 size: self.size 36 size: self.size
32 source: 'atlas://data/images/defaulttheme/button' 37 source: 'atlas://data/images/defaulttheme/button'
33 size_hint: 1, None 38 size_hint: 1, None
34 color: 1, 1, 1, 1 39 color: 1, 1, 1, 1
40 text: self.message
35 text_size: self.width, None 41 text_size: self.width, None
36 halign: 'center' 42 halign: 'center'
37 height: self.texture_size[1] 43 size: self.texture_size
38 padding: dp(2), dp(10) 44 padding: dp(2), dp(10)
39 45
40 <NotesDrop>: 46 <NotesDrop>:
41 clear_btn: clear_btn.__self__ 47 clear_btn: clear_btn.__self__
42 auto_width: False 48 auto_width: False