eric7/UI/UserInterface.py

branch
eric7
changeset 8583
aac629a05f8b
parent 8580
e91b276e0771
child 8587
78971b458d25
diff -r ae6032e4b4ef -r aac629a05f8b eric7/UI/UserInterface.py
--- a/eric7/UI/UserInterface.py	Sun Sep 05 18:07:03 2021 +0200
+++ b/eric7/UI/UserInterface.py	Mon Sep 06 19:52:37 2021 +0200
@@ -1120,15 +1120,17 @@
         
         logging.debug("Creating Sidebars Layout...")
         
-        delay = Preferences.getUI("SidebarDelay")
         # Create the left sidebar
-        self.leftSidebar = EricSideBar(EricSideBarSide.WEST, delay)
+        self.leftSidebar = EricSideBar(EricSideBarSide.WEST)
+        self.leftSidebar.setIconBarColor(Preferences.getUI("IconBarColor"))
         
         # Create the bottom sidebar
-        self.bottomSidebar = EricSideBar(EricSideBarSide.SOUTH, delay)
+        self.bottomSidebar = EricSideBar(EricSideBarSide.SOUTH)
+        self.bottomSidebar.setIconBarColor(Preferences.getUI("IconBarColor"))
         
         # Create the right sidebar
-        self.rightSidebar = EricSideBar(EricSideBarSide.EAST, delay)
+        self.rightSidebar = EricSideBar(EricSideBarSide.EAST)
+        self.rightSidebar.setIconBarColor(Preferences.getUI("IconBarColor"))
         
         ####################################################
         ## Populate the left side bar
@@ -1136,29 +1138,31 @@
         
         self.leftSidebar.addTab(
             self.projectBrowser,
-            UI.PixmapCache.getIcon("projectViewer"),
+            UI.PixmapCache.getIcon("sbProjectViewer48"),
             self.tr("Project-Viewer"))
 
         self.leftSidebar.addTab(
             self.multiProjectBrowser,
-            UI.PixmapCache.getIcon("multiProjectViewer"),
+            UI.PixmapCache.getIcon("sbMultiProjectViewer48"),
             self.tr("Multiproject-Viewer"))
 
         if self.templateViewer:
             self.leftSidebar.addTab(
                 self.templateViewer,
-                UI.PixmapCache.getIcon("templateViewer"),
+                UI.PixmapCache.getIcon("sbTemplateViewer48"),
                 self.tr("Template-Viewer"))
 
         if self.browser:
-            self.leftSidebar.addTab(self.browser,
-                                    UI.PixmapCache.getIcon("browser"),
-                                    self.tr("File-Browser"))
+            self.leftSidebar.addTab(
+                self.browser,
+                UI.PixmapCache.getIcon("sbFileBrowser48"),
+                self.tr("File-Browser"))
         
         if self.symbolsViewer:
-            self.leftSidebar.addTab(self.symbolsViewer,
-                                    UI.PixmapCache.getIcon("symbols"),
-                                    self.tr("Symbols"))
+            self.leftSidebar.addTab(
+                self.symbolsViewer,
+                UI.PixmapCache.getIcon("sbSymbolsViewer48"),
+                self.tr("Symbols"))
 
         ####################################################
         ## Populate the right side bar
@@ -1167,36 +1171,37 @@
         if self.codeDocumentationViewer:
             self.rightSidebar.addTab(
                 self.codeDocumentationViewer,
-                UI.PixmapCache.getIcon("codeDocuViewer"),
+                UI.PixmapCache.getIcon("sbCodeDocuViewer48"),
                 self.tr("Code Documentation Viewer"))
         
         self.rightSidebar.addTab(
-            self.debugViewer, UI.PixmapCache.getIcon("debugViewer"),
+            self.debugViewer, UI.PixmapCache.getIcon("sbDebugViewer48"),
             self.tr("Debug-Viewer"))
 
         if self.pipWidget:
             self.rightSidebar.addTab(
-                self.pipWidget, UI.PixmapCache.getIcon("pypi"),
+                self.pipWidget, UI.PixmapCache.getIcon("sbPyPI48"),
                 self.tr("PyPI"))
         
         if self.condaWidget:
             self.rightSidebar.addTab(
-                self.condaWidget, UI.PixmapCache.getIcon("miniconda"),
+                self.condaWidget, UI.PixmapCache.getIcon("sbMiniconda48"),
                 self.tr("Conda"))
 
         if self.cooperation:
             self.rightSidebar.addTab(
-                self.cooperation, UI.PixmapCache.getIcon("cooperation"),
+                self.cooperation, UI.PixmapCache.getIcon("sbCooperation48"),
                 self.tr("Cooperation"))
         
         if self.irc:
             self.rightSidebar.addTab(
-                self.irc, UI.PixmapCache.getIcon("irc"),
+                self.irc, UI.PixmapCache.getIcon("sbIrc48"),
                 self.tr("IRC"))
         
         if self.microPythonWidget:
             self.rightSidebar.addTab(
-                self.microPythonWidget, UI.PixmapCache.getIcon("micropython"),
+                self.microPythonWidget,
+                UI.PixmapCache.getIcon("sbMicroPython48"),
                 self.tr("MicroPython"))
         
         ####################################################
@@ -1204,16 +1209,16 @@
         ####################################################
         
         self.bottomSidebar.addTab(self.taskViewer,
-                                  UI.PixmapCache.getIcon("task"),
+                                  UI.PixmapCache.getIcon("sbTasksViewer48"),
                                   self.tr("Task-Viewer"))
 
         self.bottomSidebar.addTab(self.logViewer,
-                                  UI.PixmapCache.getIcon("logViewer"),
+                                  UI.PixmapCache.getIcon("sbLogViewer48"),
                                   self.tr("Log-Viewer"))
         
         if self.numbersViewer:
             self.bottomSidebar.addTab(self.numbersViewer,
-                                      UI.PixmapCache.getIcon("numbers"),
+                                      UI.PixmapCache.getIcon("sbNumbers48"),
                                       self.tr("Numbers"))
         
         ####################################################
@@ -1228,7 +1233,7 @@
         else:
             self.__shellParent = self.bottomSidebar
         self.__shellParent.insertTab(0, self.shellAssembly,
-                                     UI.PixmapCache.getIcon("shell"),
+                                     UI.PixmapCache.getIcon("sbShell48"),
                                      self.tr("Shell"))
         
         ####################################################
@@ -1331,8 +1336,6 @@
                     container.show()
                     container.setCurrentIndex(index)
                     container.raise_()
-                    if container.isAutoHiding():
-                        container.setFocus()
     
     def showLogViewer(self):
         """
@@ -1347,8 +1350,6 @@
                 self.bottomSidebar.show()
                 self.bottomSidebar.setCurrentWidget(self.logViewer)
                 self.bottomSidebar.raise_()
-                if self.bottomSidebar.isAutoHiding():
-                    self.bottomSidebar.setFocus()
         
     def __openOnStartup(self, startupType=None):
         """
@@ -6197,6 +6198,14 @@
         self.newWindowAct.setEnabled(
             not Preferences.getUI("SingleApplicationMode"))
         
+        if self.__layoutType == "Sidebars":
+            self.leftSidebar.setIconBarColor(
+                Preferences.getUI("IconBarColor"))
+            self.bottomSidebar.setIconBarColor(
+                Preferences.getUI("IconBarColor"))
+            self.rightSidebar.setIconBarColor(
+                Preferences.getUI("IconBarColor"))
+        
         self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength")
         self.captionShowsFilename = Preferences.getUI("CaptionShowsFilename")
         if not self.captionShowsFilename:
@@ -6224,12 +6233,6 @@
                 Preferences.getEditor("SpellCheckingDefaultLanguage"),
                 pwl, pel)
         
-        if self.__layoutType == "Sidebars":
-            delay = Preferences.getUI("SidebarDelay")
-            self.leftSidebar.setDelay(delay)
-            self.bottomSidebar.setDelay(delay)
-            self.rightSidebar.setDelay(delay)
-        
         if Preferences.getUI("UseSystemProxy"):
             QNetworkProxyFactory.setUseSystemConfiguration(True)
         else:
@@ -7018,11 +7021,6 @@
         
         self.virtualenvManager.shutdown()
         
-        if self.__layoutType == "Sidebars":
-            self.leftSidebar.shutdown()
-            self.bottomSidebar.shutdown()
-            self.rightSidebar.shutdown()
-        
         if self.SAServer is not None:
             self.SAServer.shutdown()
             self.SAServer = None

eric ide

mercurial