r23872 by jghali - Fix some widgets not switching icons properly when changing icon theme
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 2 18:32:50 UTC 2020
Author: jghali
Date: Tue Jun 2 18:32:50 2020
New Revision: 23872
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23872
Log:
Fix some widgets not switching icons properly when changing icon theme
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/ui/pageselector.cpp
trunk/Scribus/scribus/ui/pageselector.h
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23872&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jun 2 18:32:50 2020
@@ -8849,6 +8849,7 @@
IconManager& iconManager = IconManager::instance();
setWindowIcon(iconManager.loadIcon("AppIcon.png"));
+ setStyleSheet();
zoomDefaultToolbarButton->setIcon(iconManager.loadIcon("16/zoom-original.png"));
zoomOutToolbarButton->setIcon(iconManager.loadIcon("16/zoom-out.png"));
Modified: trunk/Scribus/scribus/ui/pageselector.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23872&path=/trunk/Scribus/scribus/ui/pageselector.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageselector.cpp (original)
+++ trunk/Scribus/scribus/ui/pageselector.cpp Tue Jun 2 18:32:50 2020
@@ -20,6 +20,7 @@
#include <QValidator>
#include "scpaths.h"
+#include "scribusapp.h"
#include "iconmanager.h"
#include "util.h"
@@ -105,6 +106,8 @@
languageChange();
// signals and slots connections
+ connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(iconSetChange()));
+
connect( m_pageCombo, SIGNAL( activated(int) ), this, SLOT( gotoPage(int) ) );
connect( backButton, SIGNAL( clicked() ), this, SLOT( goBackward()) );
connect( startButton, SIGNAL( clicked() ), this, SLOT( goToStart() ) );
@@ -211,6 +214,19 @@
QWidget::changeEvent(e);
}
+void PageSelector::iconSetChange()
+{
+ QByteArray stylesheet;
+ if (loadRawText(ScPaths::instance().libDir() + "scribus.css", stylesheet))
+ {
+ QString downArrow(IconManager::instance().pathForIcon("16/go-down.png"));
+ QByteArray da;
+ da.append(downArrow);
+ stylesheet.replace("___downArrow___", da);
+ setStyleSheet(QString(stylesheet));
+ }
+}
+
void PageSelector::languageChange()
{
startButton->setToolTip( tr("Go to the first page") );
Modified: trunk/Scribus/scribus/ui/pageselector.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23872&path=/trunk/Scribus/scribus/ui/pageselector.h
==============================================================================
--- trunk/Scribus/scribus/ui/pageselector.h (original)
+++ trunk/Scribus/scribus/ui/pageselector.h Tue Jun 2 18:32:50 2020
@@ -37,6 +37,7 @@
public slots:
virtual void setGUIForPage(int i);
virtual void setMaximum(int i);
+ void iconSetChange();
void languageChange();
void clearFocus();
More information about the scribus-commit
mailing list