Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 03089dbf authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Ensure pop-up palette's theme is changed when changing the theme.

This feels very hacky at this point though...
parent 98f0804a
......@@ -134,6 +134,19 @@ QSize KisBrushHud::sizeHint() const
void KisBrushHud::updateIcons()
{
this->setPalette(qApp->palette());
for(int i=0; i<this->children().size(); i++) {
QWidget *w = qobject_cast<QWidget*>(this->children().at(i));
if (w) {
w->setPalette(qApp->palette());
}
}
for(int i=0; i<m_d->wdgProperties->children().size(); i++) {
KisUniformPaintOpPropertyWidget *w = qobject_cast<KisUniformPaintOpPropertyWidget*>(m_d->wdgProperties->children().at(i));
if (w) {
w->slotThemeChanged(qApp->palette());
}
}
m_d->btnConfigure->setIcon(KisIconUtils::loadIcon("applications-system"));
}
......
......@@ -62,6 +62,16 @@ KisUniformPaintOpPropertySP KisUniformPaintOpPropertyWidget::property() const
return m_d->property;
}
void KisUniformPaintOpPropertyWidget::slotThemeChanged(QPalette pal)
{
for(int i=0; i<this->children().size(); i++) {
QWidget *w = qobject_cast<QWidget*>(this->children().at(i));
if (w) {
w->setPalette(pal);
}
}
}
/****************************************************************/
/* KisUniformPaintOpPropertyIntSlider */
/****************************************************************/
......
......@@ -31,6 +31,7 @@ class KisUniformPaintOpPropertyWidget : public QWidget
public:
KisUniformPaintOpPropertyWidget(KisUniformPaintOpPropertySP property, QWidget *parent);
~KisUniformPaintOpPropertyWidget() override;
void slotThemeChanged(QPalette pal);
protected:
KisUniformPaintOpPropertySP property() const;
......
......@@ -357,6 +357,14 @@ void KisPopupPalette::adjustLayout(const QPoint &p)
void KisPopupPalette::slotUpdateIcons()
{
this->setPalette(qApp->palette());
for(int i=0; i<this->children().size(); i++) {
QWidget *w = qobject_cast<QWidget*>(this->children().at(i));
if (w) {
w->setPalette(qApp->palette());
}
}
zoomToOneHundredPercentButton->setIcon(m_actionCollection->action("zoom_to_100pct")->icon());
m_brushHud->updateIcons();
m_settingsButton->setIcon(KisIconUtils::loadIcon("tag"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment