From kde-commits Sun Dec 31 19:41:45 2017 From: Scott Petrovic Date: Sun, 31 Dec 2017 19:41:45 +0000 To: kde-commits Subject: [krita/petrovic/theme-update] plugins/dockers/advancedcolorselector: Use the value from the alternat Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=151474931625351 Git commit 998129975fe704b2ab0d61afbf9bcfe5c96020b1 by Scott Petrovic. Committed on 31/12/2017 at 17:20. Pushed by scottpetrovic into branch 'petrovic/theme-update'. Use the value from the alternate background for the color selector. This he= lps when going between dark and blender theme M +2 -4 plugins/dockers/advancedcolorselector/kis_color_selector.cpp M +2 -4 plugins/dockers/advancedcolorselector/kis_color_selector_com= bo_box.cpp https://commits.kde.org/krita/998129975fe704b2ab0d61afbf9bcfe5c96020b1 diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector.cpp b= /plugins/dockers/advancedcolorselector/kis_color_selector.cpp index 5a3a3ee0a3d..1f3e9389692 100644 --- a/plugins/dockers/advancedcolorselector/kis_color_selector.cpp +++ b/plugins/dockers/advancedcolorselector/kis_color_selector.cpp @@ -171,10 +171,8 @@ void KisColorSelector::paintEvent(QPaintEvent* e) = // for selecting colors we want to keep a somewhat neutral gray to mak= e selecting // a color easier in case someone uses a wacky theme color - QColor bgColor =3D qApp->palette().color(QPalette::Base); - int darkenCoeff =3D bgColor.value() > 128 ? 180 : 50; // same logic= icons use - - p.fillRect(0,0,width(),height(),QColor(darkenCoeff,darkenCoeff,darkenC= oeff)); + QColor bgColor =3D 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); diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector_combo= _box.cpp b/plugins/dockers/advancedcolorselector/kis_color_selector_combo_b= ox.cpp index 266d152b39a..b8cd6d48878 100644 --- a/plugins/dockers/advancedcolorselector/kis_color_selector_combo_box.cpp +++ b/plugins/dockers/advancedcolorselector/kis_color_selector_combo_box.cpp @@ -129,10 +129,8 @@ protected: { QPainter painter(this); = - QColor bgColor =3D qApp->palette().color(QPalette::Base); - int darkenCoeff =3D bgColor.value() > 128 ? 180 : 50; // same l= ogic icons use - - painter.fillRect(0,0,width(), height(), QColor(darkenCoeff,darkenC= oeff,darkenCoeff)); + QColor bgColor =3D qApp->palette().color(QPalette::AlternateBase); + painter.fillRect(0,0,width(), height(), QColor(bgColor.value(),bgC= olor.value(),bgColor.value())); painter.fillRect(highlightArea, palette().highlight()); } =