eric7/EricWidgets/EricApplication.py

branch
eric7
changeset 8729
226da2e26a84
parent 8358
144a6b854f70
child 8837
6b4b2acc5324
equal deleted inserted replaced
8728:62b44a7c0a3a 8729:226da2e26a84
31 QCoreApplication.setAttribute( 31 QCoreApplication.setAttribute(
32 Qt.ApplicationAttribute.AA_DontCreateNativeWidgetSiblings, True) 32 Qt.ApplicationAttribute.AA_DontCreateNativeWidgetSiblings, True)
33 33
34 self.__objectRegistry = {} 34 self.__objectRegistry = {}
35 self.__pluginObjectRegistry = {} 35 self.__pluginObjectRegistry = {}
36
37 self.__smallScreen = False
38 if "--small-screen" in argv:
39 self.__smallScreen = True
40 argv.remove("--small-screen")
41 if not self.__smallScreen:
42 primaryScreenSize = self.primaryScreen().size()
43 self.__smallScreen = (
44 primaryScreenSize.width() < 1920 or
45 primaryScreenSize.height() < 1080
46 )
47
48 def usesSmallScreen(self):
49 """
50 Public method to determine, if the application is used on a small
51 screen.
52
53 @return flag indicating the use of a small screen
54 @rtype bool
55 """
56 return self.__smallScreen
36 57
37 def registerObject(self, name, objectRef): 58 def registerObject(self, name, objectRef):
38 """ 59 """
39 Public method to register an object in the object registry. 60 Public method to register an object in the object registry.
40 61

eric ide

mercurial