View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017925 | Scribus | User Interface | public | 2026-08-16 03:25 | 2026-09-04 14:09 |
| Reporter | qirat | Assigned To | jghali | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Platform | Linux | OS | Fedora Workstation | OS Version | 44 |
| Product Version | 1.7.4.svn | ||||
| Fixed in Version | 1.7.4.svn | ||||
| Summary | 0017925: Dark theme: tab-close/floating-panel-close button hover/press feedback invisible | ||||
| Description | scribus.css overrides #tabCloseButton/#floatingTitleCloseButton hover/pressed with a hardcoded black overlay, cancelling the docking library's own correct dark-mode (white overlay) rule. Darkening an already-dark surface is imperceptible. | ||||
| Steps To Reproduce | Dark theme → activate a tab, hover/press its ✕ (or a floating panel's ✕) → no visible feedback. | ||||
| Additional Information | Fix: Route overlay color through a ___overlayChannel___ placeholder, resolved to black/white based on live palette lightness. | ||||
| Tags | #please_test | ||||
| Attached Files | dark-theme-tab-close-hover-fix-v1.01.patch (1,637 bytes)
Index: scribus/scribus.css
===================================================================
--- scribus/scribus.css (revision 27771)
+++ scribus/scribus.css (working copy)
@@ -170,12 +170,12 @@
}
#tabCloseButton:hover {
- border: 1px solid rgba(0, 0, 0, 32);
- background: rgba(0, 0, 0, 16);
+ border: 1px solid rgba(___overlayChannel___, 32);
+ background: rgba(___overlayChannel___, 16);
}
#tabCloseButton:pressed {
- background: rgba(0, 0, 0, 32);
+ background: rgba(___overlayChannel___, 32);
}
#tabsMenuButton {
@@ -219,10 +219,10 @@
}
#floatingTitleCloseButton:hover {
- background: rgba(0, 0, 0, 24);
+ background: rgba(___overlayChannel___, 24);
border: none;
}
#floatingTitleCloseButton:pressed {
- background: rgba(0, 0, 0, 48);
+ background: rgba(___overlayChannel___, 48);
}
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 27771)
+++ scribus/scribus.cpp (working copy)
@@ -613,6 +613,11 @@
QByteArray tba;
tba.append(toolbararrow.toUtf8());
stylesheet.replace("___tb_menu_arrow___", tba);
+
+ // Hover/pressed overlay: black is invisible on a dark background.
+ const QPalette &pal = QApplication::palette();
+ bool isDarkTheme = pal.color(QPalette::WindowText).lightness() > pal.color(QPalette::Window).lightness();
+ stylesheet.replace("___overlayChannel___", isDarkTheme ? "255, 255, 255" : "0, 0, 0");
}
dockManager->setStyleSheet(stylesheet); // style sheet should be enabled when theme manager is implemented to handle color palettes in css file.
| ||||
| Patch | Yes | ||||
|
|
Here is a new improved version: uses current foreground colour for overlays; avoids explicit theme detection and unresolved CSS tokens. The initial number in the filename suggests the order it is to go while testing my four dark theme fixes (tickets in order: 0017923, 0017924, 0017925, and 0017926). 3_dark-theme-tab-close-hover-fix-v1.04.patch (2,604 bytes)
Index: scribus/scribus.css
===================================================================
--- scribus/scribus.css (revision 27791 + preceding dark-theme fixes)
+++ scribus/scribus.css (working copy)
@@ -170,12 +170,12 @@
}
#tabCloseButton:hover {
- border: 1px solid rgba(0, 0, 0, 32);
- background: rgba(0, 0, 0, 16);
+ border: 1px solid rgba(___overlayRgb___, 32);
+ background: rgba(___overlayRgb___, 16);
}
#tabCloseButton:pressed {
- background: rgba(0, 0, 0, 32);
+ background: rgba(___overlayRgb___, 32);
}
#tabsMenuButton {
@@ -219,10 +219,10 @@
}
#floatingTitleCloseButton:hover {
- background: rgba(0, 0, 0, 24);
+ background: rgba(___overlayRgb___, 24);
border: none;
}
#floatingTitleCloseButton:pressed {
- background: rgba(0, 0, 0, 48);
+ background: rgba(___overlayRgb___, 48);
}
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 27791)
+++ scribus/scribus.cpp (working copy)
@@ -613,6 +613,14 @@
QByteArray tba;
tba.append(toolbararrow.toUtf8());
stylesheet.replace("___tb_menu_arrow___", tba);
+
+ const QColor overlayColor = QApplication::palette().color(QPalette::WindowText);
+ const QByteArray overlayRgb = QString("%1, %2, %3")
+ .arg(overlayColor.red())
+ .arg(overlayColor.green())
+ .arg(overlayColor.blue())
+ .toUtf8();
+ stylesheet.replace("___overlayRgb___", overlayRgb);
}
dockManager->setStyleSheet(stylesheet); // style sheet should be enabled when theme manager is implemented to handle color palettes in css file.
Index: scribus/ui/pageselector.cpp
===================================================================
--- scribus/ui/pageselector.cpp (revision 27791)
+++ scribus/ui/pageselector.cpp (working copy)
@@ -6,6 +6,7 @@
*/
#include "pageselector.h"
+#include <QApplication>
#include <QByteArray>
#include <QComboBox>
#include <QDebug>
@@ -13,6 +14,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
+#include <QPalette>
#include <QPixmap>
#include <QPushButton>
#include <QSignalBlocker>
@@ -211,6 +213,14 @@
QByteArray da;
da.append(downArrow.toUtf8());
stylesheet.replace("___downArrow___", da);
+
+ const QColor overlayColor = QApplication::palette().color(QPalette::WindowText);
+ const QByteArray overlayRgb = QString("%1, %2, %3")
+ .arg(overlayColor.red())
+ .arg(overlayColor.green())
+ .arg(overlayColor.blue())
+ .toUtf8();
+ stylesheet.replace("___overlayRgb___", overlayRgb);
setStyleSheet(QString(stylesheet));
}
}
|
|
|
The patch has been applied to trunk. Thanks! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-08-16 03:25 | qirat | New Issue | |
| 2026-08-16 03:25 | qirat | File Added: dark-theme-tab-close-hover-fix-v1.01.patch | |
| 2026-08-29 03:28 | qirat | Note Added: 0054365 | |
| 2026-08-29 03:28 | qirat | File Added: 3_dark-theme-tab-close-hover-fix-v1.04.patch | |
| 2026-08-29 03:30 | qirat | Tag Attached: #please_test | |
| 2026-09-04 14:09 | jghali | Summary | [PATCH] Dark theme: tab-close/floating-panel-close button hover/press feedback invisible => Dark theme: tab-close/floating-panel-close button hover/press feedback invisible |
| 2026-09-04 14:09 | jghali | Assigned To | => jghali |
| 2026-09-04 14:09 | jghali | Status | new => resolved |
| 2026-09-04 14:09 | jghali | Resolution | open => fixed |
| 2026-09-04 14:09 | jghali | Fixed in Version | => 1.7.4.svn |
| 2026-09-04 14:09 | jghali | Note Added: 0054416 |