-
Notifications
You must be signed in to change notification settings - Fork 1
/
paint.kv
112 lines (88 loc) · 2.5 KB
/
paint.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#:import C kivy.utils.get_color_from_hex
<MyButton>
background_normal : 'button_normal.png'
background_down: 'button_down.png'
border : (3,3,3,3)
<ColorButton@MyButton>
group : 'color'
on_release: app.canvas_widget.set_color(self.background_color)
<LineWidthButton@MyButton>
group:'linewidth'
background_color : C('#808080')
on_release: app.canvas_widget.set_line_width(self.text)
<CanvasWidget>
Button:
text:'Clear'
font_size:20
right : root.right
top:root.top
width:80
height:40
background_normal : 'red_button_normal.png'
background_down : 'red_button_down.png'
border: (2,2,2,2)
on_release: root.clear_canvas()
BoxLayout:
orientation : 'vertical'
padding: 2
spacing :2
x : 0
top: root.top
width: 80
height :120
LineWidthButton:
text : 'Thin'
LineWidthButton:
text : 'Normal'
state: 'down'
LineWidthButton:
text : 'Thick'
BoxLayout:
orientation: 'horizontal'
padding : 2
spacing : 2
x: 0
y: 0
width : root.width
height: 40
ColorButton:
background_color: C('#2980b9')
state: 'down'
ColorButton:
background_color: C('#16a085')
ColorButton:
background_color: C('#27ae60')
ColorButton:
background_color: C('#f39c12')
ColorButton:
background_color: C('#d35400')
ColorButton:
background_color: C('#c0392b')
ColorButton:
background_color: C('#8e44ad')
ColorButton:
background_color: C('#bdc3c7')
ColorButton:
background_color: C('#7f8c8d')
ColorButton:
background_color: C('#2c3e50')
ColorButton:
background_color: C('#3498db')
ColorButton:
background_color: C('#1abc9c')
ColorButton:
background_color: C('#2ecc71')
ColorButton:
background_color: C('#f1c40f')
ColorButton:
background_color: C('#e67e22')
ColorButton:
background_color: C('#e74c3c')
ColorButton:
background_color: C('#9b59b6')
ColorButton:
background_color: C('#ecf0f1')
ColorButton:
background_color: C('#95a5a6')
ColorButton:
background_color: C('#34495e')