mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
hemirt BabyRage
This commit is contained in:
parent
6408bd249c
commit
4d1a0dd343
|
@ -29,13 +29,15 @@ SOURCES += main.cpp\
|
|||
notebook.cpp \
|
||||
notebooktab.cpp \
|
||||
notebookpage.cpp \
|
||||
notebookbutton.cpp
|
||||
notebookbutton.cpp \
|
||||
colorscheme.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
chatwidget.h \
|
||||
notebook.h \
|
||||
notebooktab.h \
|
||||
notebookpage.h \
|
||||
notebookbutton.h
|
||||
notebookbutton.h \
|
||||
colorscheme.h
|
||||
|
||||
FORMS +=
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -1,11 +1,56 @@
|
|||
#ifndef COLORSCHEME_H
|
||||
#define COLORSCHEME_H
|
||||
|
||||
#include <QColor>
|
||||
|
||||
class ColorScheme
|
||||
{
|
||||
public:
|
||||
ColorScheme();
|
||||
static bool IsLightTheme;
|
||||
|
||||
static QColor TooltipBackground;
|
||||
static QColor TooltipText;
|
||||
|
||||
static QColor ChatSeperator;
|
||||
static QColor ChatBackground;
|
||||
static QColor ChatBackgroundHighlighted;
|
||||
static QColor ChatBackgroundResub;
|
||||
static QColor ChatBackgroundWhisper;
|
||||
static QColor ChatInputOuter;
|
||||
static QColor ChatInputInner;
|
||||
static QColor ChatInputBorder;
|
||||
static QColor ChatMessageSeperatorBorder;
|
||||
static QColor ChatMessageSeperatorBorderInner;
|
||||
static QColor ChatBorder;
|
||||
static QColor ChatBorderFocused;
|
||||
|
||||
static QColor Text;
|
||||
static QColor TextCaret;
|
||||
static QColor TextLink;
|
||||
static QColor TextFocused;
|
||||
|
||||
static QColor Menu;
|
||||
static QColor MenuBorder;
|
||||
|
||||
static QColor ScrollbarBG;
|
||||
static QColor ScrollbarThumb;
|
||||
static QColor ScrollbarThumbSelected;
|
||||
static QColor ScrollbarArrow;
|
||||
|
||||
static QColor TabPanelBG;
|
||||
static QColor TabBG;
|
||||
static QColor TabHoverBG;
|
||||
static QColor TabSelectedBG;
|
||||
static QColor TabHighlightedBG;
|
||||
static QColor TabNewMessageBG;
|
||||
static QColor TabText;
|
||||
static QColor TabHoverText;
|
||||
static QColor TabSelectedText;
|
||||
static QColor TabHighlightedText;
|
||||
|
||||
static void makeScheme(float hue, float multiplyer);
|
||||
|
||||
private:
|
||||
Colorscheme() {}
|
||||
};
|
||||
|
||||
#endif // COLORSCHEME_H
|
||||
#endif // COLORSCHEME_H
|
||||
|
|
Loading…
Reference in a new issue