View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017704 | Scribus | User Interface | public | 2025-12-06 12:57 | 2025-12-07 20:48 |
| Reporter | Kerrrunchhh | Assigned To | cbradney | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.6.2 | ||||
| Fixed in Version | 1.6.5.svn | ||||
| Summary | 0017704: Dark Color Schema unusable | ||||
| Description | When the Dark Color Scheme is selected in kde a lot of menus in scribus become unusable. Mostly the third submenu is unreadable. | ||||
| Steps To Reproduce | Just open Insert->Forms->Standardforms (Maybe english translation wrong, I have a german setup). The menupoints exist but only the icon in front of the text is visible. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Patch | No | ||||
|
|
Dark themes have been improved in the current development version. The mentioned menu is now usable. But it's indeed a bit lighter in both the light and dark theme. I would suggest to close this as resolved. |
|
|
Please use the latest version. |
|
|
This patch should fix the icon color refresh after the UI theme has changed. It fixes the following places: - Tool Toolbar -> Shape menu - View Toolbar -> Color vision dropdown / image resolution dropdown - PP Line Section -> Arrow selector - Page Palette -> Page Layout selector colorfix.patch (14,366 bytes)
diff --git a/scribus/ui/autoformbuttongroup.cpp b/scribus/ui/autoformbuttongroup.cpp
index 9cf90054d..03eaba138 100644
--- a/scribus/ui/autoformbuttongroup.cpp
+++ b/scribus/ui/autoformbuttongroup.cpp
@@ -759,9 +759,10 @@ QPixmap AutoformButtonGroup::getIconPixmap(int nr, int pixmapSize)
// painter->end();
// delete painter;
+
QPainter *painter = new QPainter(&Ico);
- painter->setBrush( palette().color(QPalette::WindowText) );
- painter->setPen( QPen(palette().color(QPalette::Midlight), 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin) );
+ painter->setBrush( ScQApp->palette().color(QPalette::WindowText) );
+ painter->setPen( QPen(ScQApp->palette().color(QPalette::Midlight), 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin) );
painter->translate(2.0, 2.0);
painter->drawPath( Path.toQPainterPath(true) );
painter->end();
diff --git a/scribus/ui/linemarkerselector.cpp b/scribus/ui/linemarkerselector.cpp
index f0791531a..ea400de06 100644
--- a/scribus/ui/linemarkerselector.cpp
+++ b/scribus/ui/linemarkerselector.cpp
@@ -1,5 +1,6 @@
#include "linemarkerselector.h"
#include "ui/delegates/sclistitemdelegate.h"
+#include "scribusapp.h"
/* ********************************************************************************* *
*
@@ -24,6 +25,8 @@ LineMarkerSelector::LineMarkerSelector(QWidget *parent) :
emit scaleChanged(scale());
});
+ connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(redrawIcons()));
+
}
/* ********************************************************************************* *
@@ -37,6 +40,7 @@ void LineMarkerSelector::rebuildList(const QList<ArrowDesc> *arrowStyles)
// ArrowStyles defined in: void PrefsManager::initArrowStyles()
int index = marker() == -1 ? 0 : marker();
+ m_arrowStyles = arrowStyles;
listMarker->clear();
qreal m_devicePixelRatio = qApp->devicePixelRatio();
@@ -68,6 +72,14 @@ void LineMarkerSelector::addItem(QPixmap pixmap, const QString &label, int id)
listMarker->addItem(item);
}
+void LineMarkerSelector::redrawIcons()
+{
+ if (m_arrowStyles->empty())
+ return;
+
+ rebuildList(m_arrowStyles);
+}
+
/* ********************************************************************************* *
*
* Properties
@@ -131,7 +143,7 @@ void LineMarkerSelector::setScaleSuffix(const QString suffix)
QPixmap LineMarkerSelector::renderPixmap(FPointArray path, int width, int height, int scale)
{
- const QPalette& pal = this->palette();
+ const QPalette& pal = ScQApp->palette();
QColor textColor = pal.color(QPalette::Active, QPalette::Text);
int offsetX = 0, offsetY = 0, lineStart = 0, lineEnd = 0;
diff --git a/scribus/ui/linemarkerselector.h b/scribus/ui/linemarkerselector.h
index 3bceae21c..415f55a67 100644
--- a/scribus/ui/linemarkerselector.h
+++ b/scribus/ui/linemarkerselector.h
@@ -29,11 +29,15 @@ public:
private:
ArrowDirection m_arrowDirection { ArrowDirection::StartArrow };
int arrow = 23;
+ const QList<ArrowDesc> *m_arrowStyles;
QPixmap renderPixmap(FPointArray path, int width, int height, int scale);
void addItem(QPixmap pixmap, const QString &label, int id);
+private slots:
+ void redrawIcons();
+
signals:
void scaleChanged(double);
void markerChanged(int);
diff --git a/scribus/ui/viewtoolbar.cpp b/scribus/ui/viewtoolbar.cpp
index 5434e2fcd..3bd63bc3e 100644
--- a/scribus/ui/viewtoolbar.cpp
+++ b/scribus/ui/viewtoolbar.cpp
@@ -110,6 +110,7 @@ void ViewToolBar::languageChange()
visualMenu->addAction(im.loadIcon("color-vision-colorblind", iconSize()), CommonStrings::trVisionFullColorBlind);
visualMenu->setToolTip( tr("Select the visual appearance of the display. You can choose between normal and several color blindness forms."));
visualMenu->setStatusTip( tr("Select display visual appearance"));
+ visualMenu->setCurrentIndex(visualMenu->currentIndex());
QSignalBlocker sigImageRes(previewQualitySwitcher);
previewQualitySwitcher->clear();
@@ -118,5 +119,6 @@ void ViewToolBar::languageChange()
previewQualitySwitcher->addAction(im.loadIcon("image-resolution-low", iconSize()), tr("Low"));
previewQualitySwitcher->setToolTip( tr("Select the image preview quality"));
previewQualitySwitcher->setStatusTip( tr("Select image preview quality"));
+ previewQualitySwitcher->setCurrentIndex(previewQualitySwitcher->currentIndex());
}
diff --git a/scribus/ui/widgets/dropdown_button.cpp b/scribus/ui/widgets/dropdown_button.cpp
index 4d1a8e5fe..de4fecdb8 100644
--- a/scribus/ui/widgets/dropdown_button.cpp
+++ b/scribus/ui/widgets/dropdown_button.cpp
@@ -1,17 +1,24 @@
#include <QMenu>
#include "dropdown_button.h"
+#include "scribusapp.h"
DropdownButton::DropdownButton(QWidget *parent) : QToolButton(parent)
{
setPopupMode(QToolButton::InstantPopup);
+ connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(iconSetChange()));
}
void DropdownButton::setCurrentIndex(int index)
{
m_index = index;
- if (menu())
- indexChanged(menu()->actions().at(qBound(0, index, menu()->actions().size())));
+ if (!menu())
+ return;
+
+ if (menu()->actions().empty())
+ return;
+
+ indexChanged(menu()->actions().at(qBound(0, index, menu()->actions().size())));
}
void DropdownButton::setMenu(QMenu *menu)
@@ -49,3 +56,10 @@ void DropdownButton::indexChanged(QAction *action)
emit activated(m_index);
}
}
+
+void DropdownButton::iconSetChange()
+{
+ this->blockSignals(true);
+ setCurrentIndex(m_index);
+ this->blockSignals(false);
+}
diff --git a/scribus/ui/widgets/dropdown_button.h b/scribus/ui/widgets/dropdown_button.h
index f4cad2b11..6e60efdc4 100644
--- a/scribus/ui/widgets/dropdown_button.h
+++ b/scribus/ui/widgets/dropdown_button.h
@@ -21,6 +21,7 @@ private:
private slots:
void indexChanged(QAction *action);
+ void iconSetChange();
signals:
void currentIndexChanged(int index);
diff --git a/scribus/ui/widgets/pagelayout.cpp b/scribus/ui/widgets/pagelayout.cpp
index 24aafeab6..a653d11b4 100644
--- a/scribus/ui/widgets/pagelayout.cpp
+++ b/scribus/ui/widgets/pagelayout.cpp
@@ -18,6 +18,7 @@ for which a new license (GPL+exception) is in place.
#include "iconmanager.h"
#include "scribusapp.h"
#include "ui/widgets/form_widget.h"
+#include "ui/widgets/dropdown_button.h"
PageLayouts::PageLayouts(QWidget* parent) : QWidget( parent )
{
@@ -37,11 +38,8 @@ PageLayouts::PageLayouts(QWidget* parent) : QWidget( parent )
QFont layFont(this->font());
layFont.setPointSize(8);
- menuScheme = new QMenu();
-
- buttonScheme = new QToolButton(this);
+ buttonScheme = new DropdownButton(this);
buttonScheme->setPopupMode(QToolButton::InstantPopup);
- buttonScheme->setMenu(menuScheme);
labelScheme = new FormWidget();
labelScheme->setFont(layFont);
@@ -49,11 +47,8 @@ PageLayouts::PageLayouts(QWidget* parent) : QWidget( parent )
labelScheme->setLabelVisibility(!m_hideLabels);
layoutGroupLayout->addWidget( labelScheme );
- menuFirstPage = new QMenu();
-
- buttonFirstPage = new QToolButton(this);
+ buttonFirstPage = new DropdownButton(this);
buttonFirstPage->setPopupMode(QToolButton::InstantPopup);
- buttonFirstPage->setMenu(menuFirstPage);
labelPages = new FormWidget();
labelPages->setFont(layFont);
@@ -64,8 +59,9 @@ PageLayouts::PageLayouts(QWidget* parent) : QWidget( parent )
languageChange();
connect(ScQApp, SIGNAL(labelVisibilityChanged(bool)), this, SLOT(toggleLabelVisibility(bool)));
- connect(menuScheme, &QMenu::triggered, this, &PageLayouts::changeScheme);
- connect(menuFirstPage, &QMenu::triggered, this, &PageLayouts::changeFirstPage);
+ connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(languageChange()));
+ connect(buttonScheme, &DropdownButton::activated, this, &PageLayouts::changeScheme, Qt::UniqueConnection);
+ connect(buttonFirstPage, &DropdownButton::activated, this, &PageLayouts::changeFirstPage, Qt::UniqueConnection);
}
void PageLayouts::updateSchemeSelector(QList<PageSet> pageSets, int pagePositioning)
@@ -79,22 +75,22 @@ void PageLayouts::updateSchemeSelector(QList<PageSet> pageSets, int pagePosition
void PageLayouts::setFirstPage(int nr)
{
- if (menuFirstPage->actions().isEmpty())
+ if (buttonFirstPage->actions().isEmpty())
return;
- m_firstPage = qBound(0, nr, static_cast<int>(menuFirstPage->actions().count()));
- buttonFirstPage->setIcon(menuFirstPage->actions().at(m_firstPage)->icon());
+ m_firstPage = qBound(0, nr, static_cast<int>(buttonFirstPage->actions().count()));
+ buttonFirstPage->setCurrentIndex(m_firstPage);
}
void PageLayouts::setScheme(int nr)
{
- if (menuScheme->actions().isEmpty())
+ if (buttonScheme->actions().isEmpty())
return;
- m_scheme = qBound(0, nr, static_cast<int>(menuScheme->actions().count()));
- buttonScheme->setIcon(menuScheme->actions().at(m_scheme)->icon());
+ m_scheme = qBound(0, nr, static_cast<int>(buttonScheme->actions().count()));
reloadFirstPage(m_scheme);
+ buttonScheme->setCurrentIndex(m_scheme);
}
@@ -106,9 +102,7 @@ void PageLayouts::setHideLabelsPermanently(bool hide)
void PageLayouts::reloadScheme()
{
- disconnect(menuScheme, &QMenu::triggered, this, &PageLayouts::changeScheme);
-
- menuScheme->clear();
+ buttonScheme->clear();
for (int pg = 0; pg < m_pageSets.count(); ++pg)
{
@@ -118,25 +112,21 @@ void PageLayouts::reloadScheme()
QString psname = CommonStrings::translatePageSetString(m_pageSets[pg].Name);
if (pg == 0)
- menuScheme->addAction(IconManager::instance().loadIcon("page-simple"), psname)->setData(QVariant(pg));
+ buttonScheme->addAction(IconManager::instance().loadIcon("page-simple"), psname)->setData(QVariant(pg));
else if (pg == 1)
- menuScheme->addAction(IconManager::instance().loadIcon("page-doublesided"), psname)->setData(QVariant(pg));
+ buttonScheme->addAction(IconManager::instance().loadIcon("page-doublesided"), psname)->setData(QVariant(pg));
else if (pg == 2)
- menuScheme->addAction(IconManager::instance().loadIcon("page-3fold"), psname)->setData(QVariant(pg));
+ buttonScheme->addAction(IconManager::instance().loadIcon("page-3fold"), psname)->setData(QVariant(pg));
else if (pg == 3)
- menuScheme->addAction(IconManager::instance().loadIcon("page-4fold"), psname)->setData(QVariant(pg));
+ buttonScheme->addAction(IconManager::instance().loadIcon("page-4fold"), psname)->setData(QVariant(pg));
else
- menuScheme->addAction(IconManager::instance().loadIcon("page-simple"), psname)->setData(QVariant(pg));
+ buttonScheme->addAction(IconManager::instance().loadIcon("page-simple"), psname)->setData(QVariant(pg));
}
-
- connect(menuScheme, &QMenu::triggered, this, &PageLayouts::changeScheme);
}
void PageLayouts::reloadFirstPage(int scheme)
{
- disconnect(menuFirstPage, &QMenu::triggered, this, &PageLayouts::changeFirstPage);
-
- menuFirstPage->clear();
+ buttonFirstPage->clear();
// We have to add the other cases if want to support them again
// CommonStrings::pageLocLeft
@@ -150,14 +140,13 @@ void PageLayouts::reloadFirstPage(int scheme)
QString psname = m_pageSets[scheme].pageNames[pg];
if (psname == CommonStrings::pageLocLeft)
- menuFirstPage->addAction(IconManager::instance().loadIcon("page-first-left"), psname)->setData(QVariant(pg));
+ buttonFirstPage->addAction(IconManager::instance().loadIcon("page-first-left"), psname)->setData(QVariant(pg));
else if (psname == CommonStrings::pageLocRight)
- menuFirstPage->addAction(IconManager::instance().loadIcon("page-first-right"), psname)->setData(QVariant(pg));
+ buttonFirstPage->addAction(IconManager::instance().loadIcon("page-first-right"), psname)->setData(QVariant(pg));
else
- menuFirstPage->addAction(IconManager::instance().loadIcon("page-first-left"), psname)->setData(QVariant(pg));
+ buttonFirstPage->addAction(IconManager::instance().loadIcon("page-first-left"), psname)->setData(QVariant(pg));
}
- connect(menuFirstPage, &QMenu::triggered, this, &PageLayouts::changeFirstPage);
}
void PageLayouts::toggleLabelVisibility(bool visibility)
@@ -179,22 +168,35 @@ void PageLayouts::languageChange()
labelScheme->setText( tr( "Scheme" ) );
labelPages->setText( tr( "First Page" ) );
+ QSignalBlocker sigButtonScheme(buttonScheme);
+ buttonScheme->setCurrentIndex(buttonScheme->currentIndex());
buttonScheme->setToolTip( tr( "Number of pages to show side-by-side on the canvas. Often used for allowing items to be placed across page spreads." ) );
+
+ QSignalBlocker sigFirstPage(buttonFirstPage);
+ buttonFirstPage->setCurrentIndex(buttonFirstPage->currentIndex());
buttonFirstPage->setToolTip( tr( "Location on the canvas where the first page of the document is placed" ) );
}
-void PageLayouts::changeScheme(QAction *action)
+void PageLayouts::changeScheme(int index)
{
- buttonScheme->setIcon(action->icon());
+ QAction * action = buttonScheme->menu()->actions().at(qBound(0, index, buttonScheme->menu()->actions().size()));
+
+ if (!action)
+ return;
+
int ic = action->data().toInt();
reloadFirstPage(ic);
labelPages->setVisible( ic > 0 );
emit schemeChanged(ic);
}
-void PageLayouts::changeFirstPage(QAction *action)
+void PageLayouts::changeFirstPage(int index)
{
- buttonFirstPage->setIcon(action->icon());
+ QAction * action = buttonFirstPage->menu()->actions().at(qBound(0, index, buttonFirstPage->menu()->actions().size()));
+
+ if (!action)
+ return;
+
m_firstPage = action->data().toInt();
emit firstPageChanged(m_firstPage);
}
diff --git a/scribus/ui/widgets/pagelayout.h b/scribus/ui/widgets/pagelayout.h
index d404ba4d8..473789ba9 100644
--- a/scribus/ui/widgets/pagelayout.h
+++ b/scribus/ui/widgets/pagelayout.h
@@ -16,6 +16,7 @@ class QHBoxLayout;
class QLabel;
class QMenu;
class QToolButton;
+class DropdownButton;
#include "scribusapi.h"
#include "scribusstructs.h"
@@ -57,10 +58,8 @@ private:
FormWidget* labelScheme { nullptr };
FormWidget* labelPages { nullptr };
- QToolButton* buttonScheme { nullptr };
- QToolButton* buttonFirstPage { nullptr };
- QMenu* menuScheme { nullptr };
- QMenu* menuFirstPage { nullptr };
+ DropdownButton* buttonScheme { nullptr };
+ DropdownButton* buttonFirstPage { nullptr };
QHBoxLayout* layoutGroupLayout { nullptr };
void reloadScheme();
@@ -68,8 +67,8 @@ private:
protected slots:
void languageChange();
- void changeScheme(QAction* action);
- void changeFirstPage(QAction* action);
+ void changeScheme(int index);
+ void changeFirstPage(int index);
};
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-12-06 12:57 | Kerrrunchhh | New Issue | |
| 2025-12-06 12:57 | Kerrrunchhh | File Added: scribus farbschema.png | |
| 2025-12-06 15:00 | ale | Note Added: 0053344 | |
| 2025-12-06 15:00 | ale | File Added: dark-menus-1-7.png | |
| 2025-12-06 15:00 | ale | Tag Attached: #waiting | |
| 2025-12-06 20:05 | cbradney | Assigned To | => cbradney |
| 2025-12-06 20:05 | cbradney | Status | new => resolved |
| 2025-12-06 20:05 | cbradney | Resolution | open => fixed |
| 2025-12-06 20:05 | cbradney | Fixed in Version | => 1.6.5.svn |
| 2025-12-06 20:05 | cbradney | Note Added: 0053345 | |
| 2025-12-06 20:26 | ale | Tag Detached: #waiting | |
| 2025-12-07 20:26 | nitramr | Note Added: 0053352 | |
| 2025-12-07 20:26 | nitramr | File Added: colorfix.patch | |
| 2025-12-07 20:47 | cbradney | Issue cloned: 0017705 | |
| 2025-12-07 20:48 | cbradney | Status | resolved => closed |