Changed clang format to new agreement

This commit is contained in:
Jeremy Borgman
2020-09-23 20:39:30 -05:00
committed by borgmanJeremy
parent 2cbccc3d0a
commit 0d5386edd4
167 changed files with 8567 additions and 9081 deletions

View File

@@ -17,28 +17,25 @@
#include "colorutils.h"
inline qreal
getColorLuma(const QColor& c)
inline qreal getColorLuma(const QColor& c)
{
return 0.30 * c.redF() + 0.59 * c.greenF() + 0.11 * c.blueF();
return 0.30 * c.redF() + 0.59 * c.greenF() + 0.11 * c.blueF();
}
bool
ColorUtils::colorIsDark(const QColor& c)
bool ColorUtils::colorIsDark(const QColor& c)
{
bool isWhite = false;
if (getColorLuma(c) <= 0.60) {
isWhite = true;
}
return isWhite;
bool isWhite = false;
if (getColorLuma(c) <= 0.60) {
isWhite = true;
}
return isWhite;
}
QColor
ColorUtils::contrastColor(const QColor& c)
QColor ColorUtils::contrastColor(const QColor& c)
{
int change = colorIsDark(c) ? 30 : -45;
int change = colorIsDark(c) ? 30 : -45;
return QColor(qBound(0, c.red() + change, 255),
qBound(0, c.green() + change, 255),
qBound(0, c.blue() + change, 255));
return QColor(qBound(0, c.red() + change, 255),
qBound(0, c.green() + change, 255),
qBound(0, c.blue() + change, 255));
}