Add sidebar button for global search

This commit is contained in:
Veronica Berglyd Olsen
2024-03-21 22:16:40 +01:00
parent ded03e10c5
commit 102885da6e
7 changed files with 20 additions and 1 deletions
+8
View File
@@ -67,6 +67,10 @@ class GuiSideBar(QWidget):
self.tbNovel.setToolTip("{0} [Ctrl+T]".format(self.tr("Novel Tree View")))
self.tbNovel.clicked.connect(lambda: self.viewChangeRequested.emit(nwView.NOVEL))
self.tbSearch = NIconToolButton(self, iPx)
self.tbSearch.setToolTip("{0} [Ctrl+Shift+F]".format(self.tr("Search Project")))
self.tbSearch.clicked.connect(lambda: self.viewChangeRequested.emit(nwView.SEARCH))
self.tbOutline = NIconToolButton(self, iPx)
self.tbOutline.setToolTip("{0} [Ctrl+Shift+T]".format(self.tr("Novel Outline View")))
self.tbOutline.clicked.connect(lambda: self.viewChangeRequested.emit(nwView.OUTLINE))
@@ -99,6 +103,7 @@ class GuiSideBar(QWidget):
self.outerBox = QVBoxLayout()
self.outerBox.addWidget(self.tbProject)
self.outerBox.addWidget(self.tbNovel)
self.outerBox.addWidget(self.tbSearch)
self.outerBox.addWidget(self.tbOutline)
self.outerBox.addWidget(self.tbBuild)
self.outerBox.addStretch(1)
@@ -129,6 +134,9 @@ class GuiSideBar(QWidget):
self.tbNovel.setIcon(SHARED.theme.getIcon("view_novel"))
self.tbNovel.setStyleSheet(buttonStyle)
self.tbSearch.setIcon(SHARED.theme.getIcon("view_search"))
self.tbSearch.setStyleSheet(buttonStyle)
self.tbOutline.setIcon(SHARED.theme.getIcon("view_outline"))
self.tbOutline.setStyleSheet(buttonStyle)
+1 -1
View File
@@ -486,7 +486,7 @@ class GuiIcons:
"build_excluded", "build_filtered", "build_included", "proj_chapter", "proj_details",
"proj_document", "proj_folder", "proj_note", "proj_nwx", "proj_section", "proj_scene",
"proj_stats", "proj_title", "status_idle", "status_lang", "status_lines", "status_stats",
"status_time", "view_build", "view_editor", "view_novel", "view_outline",
"status_time", "view_build", "view_editor", "view_novel", "view_outline", "view_search",
# Class Icons
"cls_archive", "cls_character", "cls_custom", "cls_entity", "cls_none", "cls_novel",