Hello,
I’m creating a new floating viewport and i instantiate it based on the screen workingarea location, this works great if im trying to get the primary screen of a split monitor or multi monitor setup, the location/size but when trying to have it be maximized, there is a odd “padding” that occurs around the edges I can’t get rid of…
I have the location zeroed out yet it still places it inset of the screen on the left, bottom, and right sides but not the top.
Expected behavior (primary screen) viewport is “tight” to all edges:
Full screen (unexpected behavior with padding inset?):
Upper left corner:
Lower left corner:
Please see code below:
class Utils():
def GetScreenCoordinates(screen_type):
"""Gets the max screen size working area excluding the dock/task bar"""
screen_size = System.Drawing.Size(800, 600)
screen_location = System.Drawing.Point(0, 0)
try:
if screen_type == 'main':
screen_size = Rhino.UI.RhinoEtoApp.MainWindow.Size
screen_location = Rhino.UI.RhinoEtoApp.MainWindow.Location
elif screen_type == 'max': # Get Max size
screen = Eto.Forms.Screen.PrimaryScreen
# screen_bounds = screen.Bounds # Gets the full screen size even with the taskbar...
screen_size = screen.WorkingArea # Gets the full screen size excluding the taskbar
return screen_location, screen_size
except Exception as ex:
Rhino.RhinoApp.WriteLine(f"CreateFloatingViewport.GetMainScreenCoordinates Exception: {ex}")
I’m stumped what is causing it, thanks for any suggestions and help!