eric7/UI/UserInterface.py

branch
eric7
changeset 8728
62b44a7c0a3a
parent 8727
e2f8a0fbf738
child 8729
226da2e26a84
equal deleted inserted replaced
8727:e2f8a0fbf738 8728:62b44a7c0a3a
167 167
168 ErrorLogFileName = "eric7_error.log" 168 ErrorLogFileName = "eric7_error.log"
169 169
170 def __init__(self, app, locale, splash, plugin, disabledPlugins, 170 def __init__(self, app, locale, splash, plugin, disabledPlugins,
171 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession, 171 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession,
172 restartArguments, originalPathString): 172 smallScreen, restartArguments, originalPathString):
173 """ 173 """
174 Constructor 174 Constructor
175 175
176 @param app reference to the application object 176 @param app reference to the application object
177 @type EricApplication 177 @type EricApplication
192 file found at statup 192 file found at statup
193 @type bool 193 @type bool
194 @param disableCrashSession flag indicating to disable the crash session 194 @param disableCrashSession flag indicating to disable the crash session
195 support 195 support
196 @type bool 196 @type bool
197 @param smallScreen flag indicating to use the interface for small
198 screens (i.e. smaller than 1920 x 1080)
199 @type bool
197 @param restartArguments list of command line parameters to be used for 200 @param restartArguments list of command line parameters to be used for
198 a restart 201 a restart
199 @type list of str 202 @type list of str
200 @param originalPathString original PATH environment variable 203 @param originalPathString original PATH environment variable
201 @type str 204 @type str
214 self.__disableCrashSession = disableCrashSession 217 self.__disableCrashSession = disableCrashSession
215 self.__disabledPlugins = disabledPlugins[:] 218 self.__disabledPlugins = disabledPlugins[:]
216 219
217 self.__originalPathString = originalPathString 220 self.__originalPathString = originalPathString
218 221
222 primaryScreenSize = app.primaryScreen().size()
223 if (
224 smallScreen or
225 primaryScreenSize.width() < 1920 or
226 primaryScreenSize.height() < 1080
227 ):
228 # override settings for small screens
229 Preferences.setUI("LayoutType", "Sidebars")
230 Preferences.setUI("CombinedLeftRightSidebar", True)
231
219 self.__layoutType = Preferences.getUI("LayoutType") 232 self.__layoutType = Preferences.getUI("LayoutType")
220 233
221 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") 234 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
222 235
223 g = Preferences.getGeometry("MainGeometry") 236 g = Preferences.getGeometry("MainGeometry")
224 if g.isEmpty(): 237 if g.isEmpty():
225 s = QSize(1280, 1024) 238 s = QSize(1280, 720)
226 self.resize(s) 239 self.resize(s)
227 else: 240 else:
228 self.restoreGeometry(g) 241 self.restoreGeometry(g)
229 self.__startup = True 242 self.__startup = True
230 243

eric ide

mercurial