hemirt BabyRage

This commit is contained in:
fourtf
2016-12-30 19:20:04 +01:00
parent 6408bd249c
commit 4d1a0dd343
4 changed files with 70 additions and 7 deletions
+13 -1
View File
@@ -1,6 +1,18 @@
#include "QColor"
#include "colorscheme.h"
ColorScheme::ColorScheme()
// hue: theme color (0 - 1)
// multiplyer: 1 = white, 0.8 = light, -0.8 dark, -1 black
void ColorScheme::makeScheme(float hue, float multiplyer)
{
IsLightTheme = multiplyer > 0;
auto getColor = [IsLightTheme, multiplyer] (qreal h, qreal s, qreal l) -> QColor
{
return QColor::fromHslF(h, s, (((l - 0.5) * multiplyer) + 0.5));
};
TextCaret = IsLightTheme ? QColor(0, 0, 0) : QColor(255, 255, 255);
//ChatBorder = IsLightTheme ? QColor()
}