-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathportrait.kv
More file actions
199 lines (174 loc) · 6.21 KB
/
Copy pathportrait.kv
File metadata and controls
199 lines (174 loc) · 6.21 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#:include jogrose.kv
#:include kbd.kv
#:include extruder.kv
#:include macros.kv
#:include mpg.kv
#:include dro.kv
#:include menu.kv
# <Widget>:
# # set default font size
# font_size: dp(12)
<LogLabel>:
# Draw a background to indicate selection
canvas.before:
Color:
rgba: (.0, 0.9, .1, .3) if self.selected else (0, 0, 0, 1)
Rectangle:
pos: self.pos
size: self.size
size_hint_y: None
height: self.texture_size[1]
text_size: self.width, None
font_name: "data/fonts/RobotoMono-Regular.ttf"
font_size: '12sp'
markup: True
<MainScreen>:
MainWindow:
id: main_window
<MainWindow>:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
BoxLayout:
orientation: 'vertical'
size_hint_x: None
width: dp(391)
BoxLayout:
# top Panel
orientation: 'horizontal'
spacing: 4
#size_hint_y: 0.5
# Jog screen etc is on left
TabbedPanel:
id: tabs
do_default_tab: False
tab_pos: 'top_mid' if app.tab_top else 'bottom_mid'
tab_width: dp(80)
tab_height: dp(60)
jog_rose: jog_rose
extruder_tab: extruder_tab
console_tab: console_tab
TabbedPanelItem:
id: jog
text: 'jog'
JogRoseWidget:
id: jog_rose
disabled: root.is_printing and not root.is_suspended
TabbedPanelItem:
id: console_tab
text: 'Keyboard'
KbdWidget:
id: kbd_widget
TabbedPanelItem:
id: mpg
text: 'MPG'
MPGWidget:
id: mpg_widget
TabbedPanelItem:
id: extruder_tab
text: 'extruder'
ExtruderWidget:
id: extruder
# DRO middle
BoxLayout:
# bottom panel
orientation: 'vertical'
size_hint_y: 0.7
DROWidget:
id: dro_widget
# Status bar at bottom
BoxLayout:
orientation: 'vertical'
size_hint_y: 0.1
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
size: status.texture_size
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.pos
size: self.size
Label:
id: status
text: root.status
color: 0,0,0,1
size_hint_x: None
width: status.texture_size[0]
Label:
id: wpos
text: 'X{:1.1f} Y{:1.1f} Z{:1.1f}'.format(*root.wpos)
color: 0,0,0,1
Label:
id: armi
text: '{}|{}'.format('A' if app.is_abs else 'R', 'I' if app.is_inch else 'M')
size_hint_x: None
width: status.texture_size[0]
color: 0,0,0,1
BoxLayout:
size_hint_y: None
size: status.texture_size
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.pos
size: self.size
Label:
id: eta
text: root.eta
color: 0,0,0,1
MacrosWidget:
id: macros
# size_hint_x: 0.4
# Console is at bottom
BoxLayout:
id: blleft
orientation: 'vertical'
size_hint_y: 0.3
RecycleView:
id: log_window
viewclass: 'LogLabel'
scroll_type: ['bars','content']
scroll_wheel_distance: dp(10)
bar_width: dp(10)
scroll_y: 0
SelectableRecycleBoxLayout:
id: log_window_layout
orientation: 'vertical'
default_size: None, None
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
multiselect: False
touch_multiselect: False
MyTextInput:
id: entry
focus: True
unfocus_on_touch: False
multiline: False
size_hint_y: None
height: self.minimum_height
font_size: '20sp'
on_text_validate: app.command_input(self.text); self.text= ''; app._refocus_text_input()
use_bubble: False
use_handles: False
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: dp(45)
ToggleButton:
text: 'UART Log'
on_state: app.main_window.toggle_uart_view(self.state)
size_hint_x: None
opacity: 1 if root.is_uart_log_enabled else 0
width: dp(80) if root.is_uart_log_enabled else 0
Button:
text: 'Run Last File'
disabled: app.gcode_file == '' or not app.is_connected or root.is_printing or app.status == 'Alarm'
on_press: app.main_window.reprint()
Button:
text: 'View Last File'
disabled: app.gcode_file == ''
on_press: app.main_window.review()