Skip to content
Snippets Groups Projects
Commit bec56947 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

bug fix osx: screeninfo: don't plan on testing OSX or other environments...

bug fix osx: screeninfo: don't plan on testing OSX or other environments myself. For this reason, I strongly encourage pull requests.
parent 5a5d7980
No related branches found
No related tags found
No related merge requests found
import io
import os
import platform
import time
import tkinter as tk
......@@ -45,9 +46,14 @@ class PILGL(GraphicsLayer):
if jupyter is False:
self.screen_width = 99999
self.screen_height = 99999
for m in get_monitors():
self.screen_height = min(self.screen_height, m.height)
self.screen_width = min(self.screen_width, m.width)
if platform.system() == "Windows" or platform.system() == "Linux":
for m in get_monitors():
self.screen_height = min(self.screen_height, m.height)
self.screen_width = min(self.screen_width, m.width)
else:
self.screen_width = 800
self.screen_height = 600
w = (self.screen_width - self.width - 10) / (self.width + 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