From b258eac215c791b2a8eed10cecbbf9551c87f0b9 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Mon, 22 Nov 2021 03:55:16 +0100 Subject: NOISSUE continue reshuffling the codebase --- launcher/ColorCache.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 launcher/ColorCache.cpp (limited to 'launcher/ColorCache.cpp') diff --git a/launcher/ColorCache.cpp b/launcher/ColorCache.cpp deleted file mode 100644 index ef268dd2..00000000 --- a/launcher/ColorCache.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "ColorCache.h" - - -/** - * Blend the color with the front color, adapting to the back color - */ -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); -} - -/** - * Blend the color with the back color - */ -QColor ColorCache::blendBackground(QColor color) -{ - // 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); - } -} -- cgit