From 7cc33e72b9cd08f41eb8d13a29f013238ca85577 Mon Sep 17 00:00:00 2001 From: brenda-br Date: Tue, 28 Feb 2023 13:32:16 +0530 Subject: Toolbar Color Change and Close Button Added for Project Title Bar --- src/main/python/main.py | 4 ++-- src/main/python/utils/toolbar.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/python/main.py b/src/main/python/main.py index 3aa8e6a..bf94a5b 100644 --- a/src/main/python/main.py +++ b/src/main/python/main.py @@ -108,7 +108,7 @@ class appWindow(QMainWindow): if not project.tabList: # important when unpickling a file instead project.newDiagram() #create a new tab in the new file project.fileCloseEvent.connect(self.fileClosed) #closed file signal to switch to sub window view - if self.count > 1: #switch to tab view if needed + if self.count > 0: #switch to tab view if needed self.mdi.setViewMode(QMdiArea.TabbedView) project.show() @@ -170,7 +170,7 @@ class appWindow(QMainWindow): def fileClosed(self, index): #checks if the file tab menu needs to be removed - if self.count <= 2 : + if self.count <= 1 : self.mdi.setViewMode(QMdiArea.SubWindowView) def writeSettings(self): diff --git a/src/main/python/utils/toolbar.py b/src/main/python/utils/toolbar.py index dbfff22..69618f0 100644 --- a/src/main/python/utils/toolbar.py +++ b/src/main/python/utils/toolbar.py @@ -31,6 +31,7 @@ class toolbar(QDockWidget): self.setWindowFlags(Qt.FramelessWindowHint) self.searchBox = QLineEdit(self.widget) #search box to search through componenets + self.searchBox.setStyleSheet("QLineEdit {background-color: white;color: black}") #set color of searchBox #connect signal to filter slot, add searchbar to toolbar self.searchBox.textChanged.connect(self.searchQuery) -- cgit