eric7/EricWidgets/EricApplication.py

branch
eric7
changeset 8729
226da2e26a84
parent 8358
144a6b854f70
child 8837
6b4b2acc5324
--- a/eric7/EricWidgets/EricApplication.py	Wed Oct 27 20:03:03 2021 +0200
+++ b/eric7/EricWidgets/EricApplication.py	Thu Oct 28 18:15:55 2021 +0200
@@ -33,6 +33,27 @@
         
         self.__objectRegistry = {}
         self.__pluginObjectRegistry = {}
+        
+        self.__smallScreen = False
+        if "--small-screen" in argv:
+            self.__smallScreen = True
+            argv.remove("--small-screen")
+        if not self.__smallScreen:
+            primaryScreenSize = self.primaryScreen().size()
+            self.__smallScreen = (
+                primaryScreenSize.width() < 1920 or
+                primaryScreenSize.height() < 1080
+            )
+    
+    def usesSmallScreen(self):
+        """
+        Public method to determine, if the application is used on a small
+        screen.
+        
+        @return flag indicating the use of a small screen
+        @rtype bool
+        """
+        return self.__smallScreen
     
     def registerObject(self, name, objectRef):
         """

eric ide

mercurial