Commit a7ca1362 authored by Halla Rempt's avatar Halla Rempt

Don't cache the palette, it can change during the lifetime of the app

Besides, on startup, theme hasn't been set, even.
parent f20c614b
......@@ -108,8 +108,6 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
setWindowTitle(i18n("Painter's Toolchest"));
if (parent) palette = parent->palette();
m_settingsWidget = new KisPopupButton(this);
m_settingsWidget->setIcon(koIcon("paintop_settings_02"));
m_settingsWidget->setToolTip(i18n("Edit brush settings"));
......@@ -985,12 +983,15 @@ void KisPaintopBox::slotToggleAlphaLockMode(bool checked)
void KisPaintopBox::toggleHighlightedButton(QToolButton* m_tool)
{
palette_highlight.setColor(QPalette::Button, palette.color(QPalette::Highlight));
if (m_tool->isChecked())
m_tool->setPalette(this->palette_highlight);
else
m_tool->setPalette(this->palette);
QPalette p = palette();
if (m_tool->isChecked()) {
QPalette palette_highlight(p);
palette_highlight.setColor(QPalette::Button, p.color(QPalette::Highlight));
m_tool->setPalette(palette_highlight);
}
else {
m_tool->setPalette(p);
}
}
void KisPaintopBox::slotReloadPreset()
{
......
......@@ -191,9 +191,6 @@ private:
QString m_currCompositeOpID;
KisNodeWSP m_previousNode;
QPalette palette;
QPalette palette_highlight;
int normalBrushSize; // when toggling between eraser mode
int eraserBrushSize;
......
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