-
Notifications
You must be signed in to change notification settings - Fork 13
/
desktop_large.kv
175 lines (155 loc) · 5.45 KB
/
desktop_large.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
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
#: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'
entry: entry
BoxLayout:
# Left panel
orientation: 'horizontal'
BoxLayout:
id: blleft
size_hint_x: 0.5
orientation: 'vertical'
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
TextInput:
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()
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
Label:
id: eta
text: root.eta
color: 0,0,0,1
MacrosWidget:
size_hint_y: 0.3
id: macros
Splitter:
# Right panel
max_size: 525
min_size: 444
size_hint_x: None
width: 450
#on_release: print('{}'.format(self.size))
BoxLayout:
orientation: 'vertical'
TabbedPanel:
id: tabs
do_default_tab: False
tab_pos: 'top_mid' if app.tab_top else 'bottom_mid'
tab_width: dp(80)
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: 'Console'
KbdWidget:
id: kbd_widget
TabbedPanelItem:
id: mpg
text: 'MPG'
MPGWidget:
id: mpg_widget
TabbedPanelItem:
id: extruder_tab
text: 'Extruder'
ExtruderWidget:
id: extruder
DROWidget:
id: dro_widget