changes for light theme

- fixed light colored text being too bright
- fixed the ripple effect being white on grey
This commit is contained in:
fourtf
2017-12-19 02:23:17 +01:00
parent 1a870685b0
commit f8e4d9a737
4 changed files with 26 additions and 7 deletions
+10 -2
View File
@@ -3,6 +3,8 @@
#include <QDebug>
#include <QPainter>
#include "colorscheme.hpp"
namespace chatterino {
namespace widgets {
@@ -16,7 +18,7 @@ RippleEffectButton::RippleEffectButton(BaseWidget *parent)
this->effectTimer.start();
}
void RippleEffectButton::setMouseEffectColor(QColor color)
void RippleEffectButton::setMouseEffectColor(boost::optional<QColor> color)
{
this->mouseEffectColor = color;
}
@@ -30,7 +32,13 @@ void RippleEffectButton::paintEvent(QPaintEvent *)
void RippleEffectButton::fancyPaint(QPainter &painter)
{
QColor &c = this->mouseEffectColor;
QColor c;
if (this->mouseEffectColor) {
c = this->mouseEffectColor.get();
} else {
c = this->colorScheme.isLightTheme() ? QColor(0, 0, 0) : QColor(255, 255, 255);
}
if (this->hoverMultiplier > 0) {
QRadialGradient gradient(mousePos.x(), mousePos.y(), 50, mousePos.x(), mousePos.y());