added basic colorscheme

This commit is contained in:
fourtf
2016-12-30 20:41:24 +01:00
parent 11e3600770
commit a175c0a54c
2 changed files with 47 additions and 42 deletions
+5 -3
View File
@@ -3,16 +3,18 @@
// hue: theme color (0 - 1)
// multiplyer: 1 = white, 0.8 = light, -0.8 dark, -1 black
void ColorScheme::makeScheme(float hue, float multiplyer)
void ColorScheme::setColors(float hue, float multiplyer)
{
IsLightTheme = multiplyer > 0;
auto getColor = [IsLightTheme, multiplyer] (qreal h, qreal s, qreal l) -> QColor
auto isLightTheme = IsLightTheme;
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()
// ChatBorder = IsLightTheme ? QColor()
}