Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmoccapy: fix fullscreen with 1024x768 screen #2831

Merged
merged 2 commits into from Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/emc/usr_intf/gmoccapy/gmoccapy.glade
Expand Up @@ -6206,7 +6206,6 @@ Mode</property>
<property name="use-action-appearance">False</property>
<property name="width-request">90</property>
<property name="height-request">56</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Switch motion mode between Joint and World mode
Expand Down
22 changes: 11 additions & 11 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Expand Up @@ -76,7 +76,7 @@ def excepthook(exc_type, exc_obj, exc_tb):

# constants
# # gmoccapy #"
_RELEASE = " 3.4.7"
_RELEASE = " 3.4.7.1"
_INCH = 0 # imperial units are active
_MM = 1 # metric units are active

Expand Down Expand Up @@ -220,7 +220,7 @@ def __init__(self, argv):

self.xpos = 40 # The X Position of the main Window
self.ypos = 30 # The Y Position of the main Window
self.width = 979 # The width of the main Window
self.width = 980 # The width of the main Window
self.height = 750 # The height of the main Window

self.gcodeerror = "" # we need this to avoid multiple messages of the same error
Expand Down Expand Up @@ -2913,20 +2913,20 @@ def on_window1_show(self, widget, data=None):
self.widgets[start_as].set_active(True)
self.widgets.window1.set_decorated(not self.prefs.getpref("hide_titlebar", False, bool))
self.widgets.chkbtn_hide_titlebar.set_active(not self.widgets.window1.get_decorated())
self.xpos = int(self.prefs.getpref("x_pos", self.xpos, float))
self.ypos = int(self.prefs.getpref("y_pos", self.ypos, float))
self.width = int(self.prefs.getpref("width", self.width, float))
self.height = int(self.prefs.getpref("height", self.height, float))
# set the adjustments according to Window position and size
self.widgets.adj_x_pos.set_value(self.xpos)
self.widgets.adj_y_pos.set_value(self.ypos)
self.widgets.adj_width.set_value(self.width)
self.widgets.adj_height.set_value(self.height)
if start_as == "rbtn_fullscreen":
self.widgets.window1.fullscreen()
elif start_as == "rbtn_maximized":
self.widgets.window1.maximize()
else:
self.xpos = int(self.prefs.getpref("x_pos", 40, float))
self.ypos = int(self.prefs.getpref("y_pos", 30, float))
self.width = int(self.prefs.getpref("width", 979, float))
self.height = int(self.prefs.getpref("height", 750, float))
# set the adjustments according to Window position and size
self.widgets.adj_x_pos.set_value(self.xpos)
self.widgets.adj_y_pos.set_value(self.ypos)
self.widgets.adj_width.set_value(self.width)
self.widgets.adj_height.set_value(self.height)
# move and resize the window
self.widgets.window1.move(self.xpos, self.ypos)
self.widgets.window1.resize(self.width, self.height)
Expand Down
4 changes: 4 additions & 0 deletions src/emc/usr_intf/gmoccapy/release_notes.txt
@@ -1,3 +1,7 @@
ver 3.4.7.1
- Remember window size and position when switching back from fullscreen/maximized
- Fix "window does not fit 1024x768 in fullscreen"

ver 3.4.7
- Added setting to allow smaller width of virtual keyboard (for widescreens)
- Fixed box_dro_side is displayed in the G-code editor (#2627)
Expand Down