diff options
author | brenda-br | 2023-02-28 13:32:16 +0530 |
---|---|---|
committer | brenda-br | 2023-02-28 13:32:16 +0530 |
commit | 7cc33e72b9cd08f41eb8d13a29f013238ca85577 (patch) | |
tree | fdb412bfa959beac34c3b529319f50187c3ab8e6 | |
parent | 01131bf76cbe184f2ddc10a5e6ce668a2f5de6d2 (diff) | |
download | Chemical-PFD-7cc33e72b9cd08f41eb8d13a29f013238ca85577.tar.gz Chemical-PFD-7cc33e72b9cd08f41eb8d13a29f013238ca85577.tar.bz2 Chemical-PFD-7cc33e72b9cd08f41eb8d13a29f013238ca85577.zip |
Toolbar Color Change and Close Button Added for Project Title Bar
-rw-r--r-- | src/main/python/main.py | 4 | ||||
-rw-r--r-- | 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) |