--- a/src/eric7/UI/UserInterface.py Sat Jan 13 13:01:09 2024 +0100 +++ b/src/eric7/UI/UserInterface.py Sun Jan 14 12:39:11 2024 +0100 @@ -1087,6 +1087,7 @@ self.hToolbox, self.tr("Horizontal Toolbox"), ) + self.hToolbox.currentChanged.connect(self.__hToolboxCurrentChanged) # Create the right toolbox self.rToolboxDock = self.__createDockWindow("rToolboxDock") @@ -1270,6 +1271,7 @@ EricSideBarSide.SOUTH, Preferences.getUI("IconBarSize") ) self.bottomSidebar.setIconBarColor(Preferences.getUI("IconBarColor")) + self.bottomSidebar.currentChanged.connect(self.__bottomSidebarCurrentChanged) # Create the right sidebar if Preferences.getUI("CombinedLeftRightSidebar"): @@ -1556,6 +1558,17 @@ self.bottomSidebar.show() self.bottomSidebar.setCurrentWidget(self.logViewer) self.bottomSidebar.raise_() + else: + if self.__layoutType == "Toolboxes": + self.hToolbox.setTabIcon( + self.hToolbox.indexOf(self.logViewer), + EricPixmapCache.getIcon("logViewerNew"), + ) + elif self.__layoutType == "Sidebars": + self.bottomSidebar.setTabIcon( + self.bottomSidebar.indexOf(self.logViewer), + EricPixmapCache.getIcon("sbLogViewerNew96"), + ) def __openOnStartup(self, startupType=None): """ @@ -5595,9 +5608,17 @@ if self.__layoutType == "Toolboxes": self.hToolboxDock.show() self.hToolbox.setCurrentWidget(self.logViewer) + self.hToolbox.setTabIcon( + self.hToolbox.currentIndex(), + EricPixmapCache.getIcon("logViewer"), + ) elif self.__layoutType == "Sidebars": self.bottomSidebar.show() self.bottomSidebar.setCurrentWidget(self.logViewer) + self.bottomSidebar.setTabIcon( + self.bottomSidebar.currentIndex(), + EricPixmapCache.getIcon("sbLogViewer96"), + ) self.logViewer.setFocus(Qt.FocusReason.ActiveWindowFocusReason) def __activateTaskViewer(self): @@ -5680,6 +5701,17 @@ if hasFocus: self.__activateViewmanager() + @pyqtSlot(int) + def __hToolboxCurrentChanged(self, index): + """ + Private slot handling a change of the current index of the Horizontal Toolbox. + + @param index current index of the horizontal toolbox + @type int + """ + if index == self.hToolbox.indexOf(self.logViewer): + self.hToolbox.setTabIcon(index, EricPixmapCache.getIcon("logViewer")) + def __toggleLeftSidebar(self): """ Private slot to handle the toggle of the left sidebar window. @@ -5722,6 +5754,19 @@ if hasFocus: self.__activateViewmanager() + @pyqtSlot(int) + def __bottomSidebarCurrentChanged(self, index): + """ + Private slot handling a change of the current index of the Bottom Sidebar. + + @param index current index of the bottom sidebar + @type int + """ + if index == self.bottomSidebar.indexOf(self.logViewer): + self.bottomSidebar.setTabIcon( + index, EricPixmapCache.getIcon("sbLogViewer96") + ) + def activateCooperationViewer(self): """ Public slot to handle the activation of the cooperation window.