Skip to content
Snippets Groups Projects
Commit cca1fa69 authored by spmohanty's avatar spmohanty
Browse files

Refactor code:

parent 13625916
No related branches found
No related tags found
No related merge requests found
...@@ -44,16 +44,16 @@ class PILGL(GraphicsLayer): ...@@ -44,16 +44,16 @@ class PILGL(GraphicsLayer):
self.background_grid = np.zeros(shape=(self.width, self.height)) self.background_grid = np.zeros(shape=(self.width, self.height))
if jupyter is False: if jupyter is False:
self.screen_width = 99999 self.screen_width = 800
self.screen_height = 99999 self.screen_height = 600
if platform.system() == "Windows" or platform.system() == "Linux": if platform.system() == "Windows" or platform.system() == "Linux":
for m in get_monitors(): for m in get_monitors():
self.screen_height = min(self.screen_height, m.height) self.screen_height = min(self.screen_height, m.height)
self.screen_width = min(self.screen_width, m.width) self.screen_width = min(self.screen_width, m.width)
else: # Note: screeninfo doesnot have proper support for
self.screen_width = 800 # OSX yet, hence the default values of 800,600
self.screen_height = 600 # will be used for the same.
w = (self.screen_width - self.width - 10) / (self.width + 1 + self.linewidth) w = (self.screen_width - self.width - 10) / (self.width + 1 + self.linewidth)
h = (self.screen_height - self.height - 10) / (self.height + 1 + self.linewidth) h = (self.screen_height - self.height - 10) / (self.height + 1 + self.linewidth)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment