-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodespace.kv
More file actions
78 lines (67 loc) · 1.56 KB
/
codespace.kv
File metadata and controls
78 lines (67 loc) · 1.56 KB
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
#:kivy 1.9.0
<CodeSpace>:
orientation: 'lr-tb'
size_hint: (1, None)
height: self.minimum_height
spacing:[0,1]
canvas.before:
Color:
rgba: 0, 0, 0, .2
Rectangle:
pos: self.pos
size: self.size
<CodeLine>:
height: self.fontsize + 2* self.spacing[1]+ self.padding[1]+self.padding[3]
on_minimum_height: self.height = max(self.minimum_height, self.fontsize + 2*self.spacing[1]+self.padding[1]+self.padding[3])
spacing: [2,2]
orientation: 'lr-tb'
size_hint_y: None
padding: [3,3,3,2]
canvas.after:
Color:
rgba: .5, .5, .5, .5
Line:
rectangle: self.x,self.y,self.width,self.height
<CodeLinePlus>:
draghandle: draghandle
codeline: codeline
removeline: removeline
orientation: 'horizontal'
height: self.codeline.height
size_hint: (1,None)
Button:
id: draghandle
text: str(root.linenum)
size_hint_x: None
height: root.codeline.height
width: root.fontsize * 1.5
font_size:root.fontsize * .5
on_release: root.drag_move()
on_press: root.tap_add()
CodeLine:
id: codeline
fontsize: root.fontsize
Button:
id: removeline
text: "X"
size_hint_x: None
height: root.codeline.height
width: root.fontsize
font_size:root.fontsize * .5
on_release: root.remove_line()
<BlockSpace>:
orientation: 'lr-tb'
size_hint: (1, None)
height: self.minimum_height
spacing: [self.fontsize / 2,self.fontsize / 4]
padding: [5,5,5,5]
canvas.before:
Color:
rgba: 1, 1, 1, .15
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: 0, 0, 0, 1
Line:
rectangle: self.x,self.y,self.width,self.height