diff --git a/nw/assets/icons/typicons_colour_dark/document-text.svg b/nw/assets/icons/typicons_colour_dark/document-text.svg index 1fb9b11a..d363691e 100644 --- a/nw/assets/icons/typicons_colour_dark/document-text.svg +++ b/nw/assets/icons/typicons_colour_dark/document-text.svg @@ -5,11 +5,11 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - id="svg2161" - viewBox="0 0 24 24" - height="24" + version="1.2" width="24" - version="1.2"> + height="24" + viewBox="0 0 24 24" + id="svg2161"> @@ -25,11 +25,11 @@ + style="opacity:0.95;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.71486783;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="display:inline;fill:#595959;fill-opacity:1;stroke-width:1.11111116" /> diff --git a/nw/assets/icons/typicons_grey_dark/document-text.svg b/nw/assets/icons/typicons_grey_dark/document-text.svg index 1fb9b11a..d363691e 100644 --- a/nw/assets/icons/typicons_grey_dark/document-text.svg +++ b/nw/assets/icons/typicons_grey_dark/document-text.svg @@ -5,11 +5,11 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - id="svg2161" - viewBox="0 0 24 24" - height="24" + version="1.2" width="24" - version="1.2"> + height="24" + viewBox="0 0 24 24" + id="svg2161"> @@ -25,11 +25,11 @@ + style="opacity:0.95;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.71486783;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="display:inline;fill:#595959;fill-opacity:1;stroke-width:1.11111116" /> diff --git a/nw/gui/docbars.py b/nw/gui/docbars.py index e79ac3f8..15733d27 100644 --- a/nw/gui/docbars.py +++ b/nw/gui/docbars.py @@ -213,32 +213,40 @@ class GuiDocTitleBar(QWidget): lblFont.setPointSizeF(0.9*self.theTheme.fontPointSize) self.theTitle.setFont(lblFont) + buttonStyle = ( + "QToolButton {{border: none; background: transparent;}} " + "QToolButton:hover {{border: none; background: rgba({0},{1},{2},0.2);}}" + ).format(*self.theTheme.colText) + # Buttons - self.closeButton = QPushButton("") + self.closeButton = QToolButton(self) self.closeButton.setIcon(self.theTheme.getIcon("close")) self.closeButton.setContentsMargins(0, 0, 0, 0) self.closeButton.setIconSize(QSize(fPx, fPx)) self.closeButton.setFixedSize(fPx, fPx) - self.closeButton.setFlat(True) + self.closeButton.setStyleSheet(buttonStyle) + self.closeButton.setToolButtonStyle(Qt.ToolButtonIconOnly) self.closeButton.setVisible(False) self.closeButton.clicked.connect(self._closeDocument) if self.isEditor: - self.minmaxButton = QPushButton("") + self.minmaxButton = QToolButton(self) self.minmaxButton.setIcon(self.theTheme.getIcon("maximise")) self.minmaxButton.setContentsMargins(0, 0, 0, 0) self.minmaxButton.setIconSize(QSize(fPx, fPx)) self.minmaxButton.setFixedSize(fPx, fPx) - self.minmaxButton.setFlat(True) + self.minmaxButton.setStyleSheet(buttonStyle) + self.minmaxButton.setToolButtonStyle(Qt.ToolButtonIconOnly) self.minmaxButton.setVisible(False) self.minmaxButton.clicked.connect(self._minmaxDocument) else: - self.refreshButton = QPushButton("") + self.refreshButton = QToolButton(self) self.refreshButton.setIcon(self.theTheme.getIcon("refresh")) self.refreshButton.setContentsMargins(0, 0, 0, 0) self.refreshButton.setIconSize(QSize(fPx, fPx)) self.refreshButton.setFixedSize(fPx, fPx) - self.refreshButton.setFlat(True) + self.refreshButton.setStyleSheet(buttonStyle) + self.refreshButton.setToolButtonStyle(Qt.ToolButtonIconOnly) self.refreshButton.setVisible(False) self.refreshButton.clicked.connect(self._refreshDocument)