Commit c9da1a31 authored by Scott Petrovic's avatar Scott Petrovic

Revert "Use the value from the alternate background for the color selector....

Revert "Use the value from the alternate background for the color selector. This helps when going between dark and blender theme"

This reverts commit 99812997.
parent 6f8be83b
......@@ -183,8 +183,10 @@ 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::AlternateBase);
p.fillRect(0,0,width(),height(),QColor(bgColor.value(),bgColor.value(),bgColor.value()));
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));
p.setRenderHint(QPainter::Antialiasing);
// this variable name isn't entirely accurate to what always happens. see definition in header file to understand it better
......
......@@ -129,8 +129,10 @@ protected:
{
QPainter painter(this);
QColor bgColor = qApp->palette().color(QPalette::AlternateBase);
painter.fillRect(0,0,width(), height(), QColor(bgColor.value(),bgColor.value(),bgColor.value()));
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));
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