Make the copy button switch light/dark theme (#3057)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
#define LOOKUP_COLOR_COUNT 360
|
||||
|
||||
#include "singletons/Theme.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "singletons/Resources.hpp"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#define LOOKUP_COLOR_COUNT 360
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
Theme::Theme()
|
||||
@@ -80,6 +83,16 @@ void Theme::actuallyUpdate(double hue, double multiplier)
|
||||
this->splits.background = getColor(0, sat, 1);
|
||||
this->splits.dropPreview = QColor(0, 148, 255, 0x30);
|
||||
this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff);
|
||||
|
||||
// Copy button
|
||||
if (this->isLightTheme())
|
||||
{
|
||||
this->buttons.copy = getResources().buttons.copyDark;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->buttons.copy = getResources().buttons.copyLight;
|
||||
}
|
||||
}
|
||||
|
||||
void Theme::normalizeColor(QColor &color)
|
||||
|
||||
Reference in New Issue
Block a user