From 32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 19 Sep 2019 00:41:48 -0700 Subject: merged from 0.6.7 codebase --- application/ColorCache.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'application/ColorCache.cpp') diff --git a/application/ColorCache.cpp b/application/ColorCache.cpp index e216b597..ef268dd2 100644 --- a/application/ColorCache.cpp +++ b/application/ColorCache.cpp @@ -6,13 +6,13 @@ */ QColor ColorCache::blend(QColor color) { - if (Rainbow::luma(m_front) > Rainbow::luma(m_back)) - { - // for dark color schemes, produce a fitting color first - color = Rainbow::tint(m_front, color, 0.5); - } - // adapt contrast - return Rainbow::mix(m_front, color, m_bias); + if (Rainbow::luma(m_front) > Rainbow::luma(m_back)) + { + // for dark color schemes, produce a fitting color first + color = Rainbow::tint(m_front, color, 0.5); + } + // adapt contrast + return Rainbow::mix(m_front, color, m_bias); } /** @@ -20,16 +20,16 @@ QColor ColorCache::blend(QColor color) */ QColor ColorCache::blendBackground(QColor color) { - // adapt contrast - return Rainbow::mix(m_back, color, m_bias); + // adapt contrast + return Rainbow::mix(m_back, color, m_bias); } void ColorCache::recolorAll() { - auto iter = m_colors.begin(); - while(iter != m_colors.end()) - { - iter->front = blend(iter->original); - iter->back = blendBackground(iter->original); - } + auto iter = m_colors.begin(); + while(iter != m_colors.end()) + { + iter->front = blend(iter->original); + iter->back = blendBackground(iter->original); + } } -- cgit v1.2.3