summaryrefslogtreecommitdiffstats
path: root/application/ColorCache.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-07-15 14:51:05 +0200
committerPetr Mrázek <peterix@gmail.com>2018-07-15 14:51:05 +0200
commitbbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9 (patch)
treee6497e304b7b9368367565fbc7c06efab1124b1c /application/ColorCache.cpp
parent03280cc62e75f8073f8d3d9e9e3952acf21fa77d (diff)
downloadMultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar
MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.gz
MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.lz
MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.xz
MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.zip
NOISSUE tabs -> spaces
Diffstat (limited to 'application/ColorCache.cpp')
-rw-r--r--application/ColorCache.cpp30
1 files changed, 15 insertions, 15 deletions
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);
+ }
}