Skip to content

Commit 38ecb7b

Browse files
committed
gmoccapy: adapt 800x600 config
1 parent 17f86eb commit 38ecb7b

2 files changed

Lines changed: 22 additions & 10 deletions

File tree

configs/sim/gmoccapy/gmoccapy_800x600.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from gi.repository import Pango
22

3+
second_row_gremlin_buttons = False
4+
show_toolinfo_on_main_page = True
5+
36
# reduce size of v-buttons
47
self.widgets["vbtb_main"].set_size_request(78, -1)
58
self.widgets["lbl_time"].hide()
@@ -31,25 +34,28 @@
3134
# second row for gremlin buttons
3235
self.widgets["box_gremlin_buttons"].remove(self.widgets["tbtn_view_dimension"])
3336
self.widgets["box_gremlin_buttons"].remove(self.widgets["tbtn_view_tool_path"])
34-
self.widgets["box_gremlin_buttons"].remove(self.widgets["btn_delete_view"])
35-
self.widgets["btn_zoom_out"].set_margin_end(0)
36-
hbox_gremlin_buttons_2 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
37-
hbox_gremlin_buttons_2.show()
38-
hbox_gremlin_buttons_2.pack_end(self.widgets["btn_delete_view"], False, False, 0)
39-
hbox_gremlin_buttons_2.pack_end(self.widgets["tbtn_view_tool_path"], False, False, 0)
40-
hbox_gremlin_buttons_2.pack_end(self.widgets["tbtn_view_dimension"], False, False, 0)
41-
self.widgets["vbox15"].pack_end(hbox_gremlin_buttons_2, False, False, 3)
37+
if second_row_gremlin_buttons:
38+
self.widgets["box_gremlin_buttons"].remove(self.widgets["btn_delete_view"])
39+
self.widgets["btn_zoom_out"].set_margin_end(0)
40+
hbox_gremlin_buttons_2 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
41+
hbox_gremlin_buttons_2.show()
42+
hbox_gremlin_buttons_2.pack_end(self.widgets["btn_delete_view"], False, False, 0)
43+
hbox_gremlin_buttons_2.pack_end(self.widgets["tbtn_view_tool_path"], False, False, 0)
44+
hbox_gremlin_buttons_2.pack_end(self.widgets["tbtn_view_dimension"], False, False, 0)
45+
self.widgets["vbox15"].pack_end(hbox_gremlin_buttons_2, False, False, 3)
4246

4347
# reorder settings page
4448
self.widgets["vbox_file"].remove(self.widgets["frm_message_position"])
4549
self.widgets["vbox_file"].remove(self.widgets["frm_themes"])
50+
self.widgets["vbox_file"].remove(self.widgets["frm_gcodeview_font"])
4651
vbox_c1 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
4752
vbox_c2 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
4853
hbox_setup_appearance_2 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
4954
hbox_setup_appearance_2.pack_start(vbox_c1, False, False, 3)
5055
hbox_setup_appearance_2.pack_start(vbox_c2, False, False, 3)
5156
hbox_setup_appearance_2.show()
5257
vbox_c1.pack_start(self.widgets["frm_message_position"], False, False, 3)
58+
vbox_c1.pack_start(self.widgets["frm_gcodeview_font"], False, False, 3)
5359
vbox_c2.pack_start(self.widgets["frm_themes"], False, False, 3)
5460
vbox_c1.show()
5561
vbox_c2.show()
@@ -64,6 +70,10 @@
6470

6571
box_info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
6672
box_info.show()
73+
if show_toolinfo_on_main_page:
74+
self.widgets.box_tool_and_code_info_2.remove(self.widgets.box_tool_info)
75+
self.widgets.vbox15.pack_start(self.widgets.box_tool_info, False, False, 0)
76+
self.widgets.lbl_toolinfo_gcodes.set_text("G-codes")
6777
box_info.pack_start(self.widgets["box_tool_and_code_info"], False, False, 0)
6878
box_info.pack_end(self.widgets["hbox_main_info"], False, False, 0)
6979
self.widgets["ntb_user_tabs"].append_page(box_info, Gtk.Label("Info"))
@@ -80,4 +90,6 @@
8090
self.widgets.adj_x_pos.set_value(self.xpos)
8191
self.widgets.adj_y_pos.set_value(self.ypos)
8292
self.widgets.adj_width.set_value(self.width)
83-
self.widgets.adj_height.set_value(self.height)
93+
self.widgets.adj_height.set_value(self.height)
94+
self.widgets.adj_jog_box_width.set_value(300)
95+
self.widgets.vbx_jog.set_size_request(self.widgets.adj_jog_box_width.get_value(), -1)

src/emc/usr_intf/gmoccapy/gmoccapy.glade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2506,7 +2506,7 @@ uncomment selection</property>
25062506
</object>
25072507
</child>
25082508
<child type="tab">
2509-
<object class="GtkLabel">
2509+
<object class="GtkLabel" id="lbl_toolinfo_gcodes">
25102510
<property name="visible">True</property>
25112511
<property name="can-focus">False</property>
25122512
<property name="label" translatable="yes">Tool info and G-codes</property>

0 commit comments

Comments
 (0)