Skip to content

Commit

Permalink
Drop the wrapper widget for the search tool header (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Jan 9, 2025
1 parent 31a75f0 commit 2085fbe
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions novelwriter/gui/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,8 @@ def __init__(self, parent: QWidget) -> None:
self.headerBox.setContentsMargins(0, 0, 0, 0)
self.headerBox.setSpacing(0)

self.headerWidget = QWidget(self)
self.headerWidget.setLayout(self.headerBox)
self.headerWidget.setContentsMargins(0, 0, 0, 0)

self.outerBox = QVBoxLayout()
self.outerBox.addWidget(self.headerWidget, 0)
self.outerBox.addLayout(self.headerBox, 0)
self.outerBox.addWidget(self.searchText, 0)
self.outerBox.addWidget(self.searchResult, 1)
self.outerBox.setContentsMargins(0, 0, 0, 0)
Expand All @@ -164,9 +160,6 @@ def updateTheme(self) -> None:
colBase = cssCol(qPalette.base().color())
colFocus = cssCol(qPalette.highlight().color())

self.headerWidget.setStyleSheet(f"QWidget {{background: {colBase};}}")
self.headerWidget.setAutoFillBackground(True)

self.setStyleSheet(
"QToolBar {padding: 0; background: none;} "
f"QLineEdit {{border: {bPx}px solid {colBase}; padding: {mPx}px;}} "
Expand Down

0 comments on commit 2085fbe

Please sign in to comment.