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 99812997 authored by Scott Petrovic's avatar Scott Petrovic

Use the value from the alternate background for the color selector. This helps...

Use the value from the alternate background for the color selector. This helps when going between dark and blender theme
parent 970ff75a
......@@ -171,10 +171,8 @@ void KisColorSelector::paintEvent(QPaintEvent* e)
// for selecting colors we want to keep a somewhat neutral gray to make selecting
// a color easier in case someone uses a wacky theme color
QColor bgColor = qApp->palette().color(QPalette::Base);
int darkenCoeff = bgColor.value() > 128 ? 180 : 50; // same logic icons use
p.fillRect(0,0,width(),height(),QColor(darkenCoeff,darkenCoeff,darkenCoeff));
QColor bgColor = qApp->palette().color(QPalette::AlternateBase);
p.fillRect(0,0,width(),height(),QColor(bgColor.value(),bgColor.value(),bgColor.value()));
p.setRenderHint(QPainter::Antialiasing);
m_mainComponent->paintEvent(&p);
......
......@@ -129,10 +129,8 @@ protected:
{
QPainter painter(this);
QColor bgColor = qApp->palette().color(QPalette::Base);
int darkenCoeff = bgColor.value() > 128 ? 180 : 50; // same logic icons use
painter.fillRect(0,0,width(), height(), QColor(darkenCoeff,darkenCoeff,darkenCoeff));
QColor bgColor = qApp->palette().color(QPalette::AlternateBase);
painter.fillRect(0,0,width(), height(), QColor(bgColor.value(),bgColor.value(),bgColor.value()));
painter.fillRect(highlightArea, palette().highlight());
}
......
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