From e39b9093f9e6e1fe6bca8536d4333e383dd9e508 Mon Sep 17 00:00:00 2001 From: fourtf Date: Tue, 19 Dec 2017 02:37:58 +0100 Subject: [PATCH] fixed selection color for light theme --- src/colorscheme.cpp | 3 +++ src/colorscheme.hpp | 2 ++ src/widgets/helper/channelview.cpp | 2 +- src/widgets/helper/rippleeffectlabel.cpp | 2 -- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/colorscheme.cpp b/src/colorscheme.cpp index a2d7b9c14..70a670f82 100644 --- a/src/colorscheme.cpp +++ b/src/colorscheme.cpp @@ -117,6 +117,9 @@ void ColorScheme::setColors(double hue, double multiplier) "border:" + TabSelectedBackground.name() + ";" + "color:" + Text.name() + ";" + "selection-background-color:" + TabSelectedBackground.name(); + // Selection + Selection = isLightTheme() ? QColor(0, 0, 0, 64) : QColor(255, 255, 255, 64); + this->updated(); } diff --git a/src/colorscheme.hpp b/src/colorscheme.hpp index 4186f7149..a8de6134a 100644 --- a/src/colorscheme.hpp +++ b/src/colorscheme.hpp @@ -75,6 +75,8 @@ public: QBrush TabNewMessageBackground; + QColor Selection; + const int HighlightColorCount = 3; QColor HighlightColors[3]; diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index 4e7e98cdf..f7d4e6372 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -576,7 +576,7 @@ void ChannelView::drawMessageSelection(QPainter &painter, messages::MessageRef * return; } - QColor selectionColor(255, 255, 255, 63); + QColor selectionColor = this->colorScheme.Selection; int charIndex = 0; size_t i = 0; diff --git a/src/widgets/helper/rippleeffectlabel.cpp b/src/widgets/helper/rippleeffectlabel.cpp index 61a182ad5..2be3b7cad 100644 --- a/src/widgets/helper/rippleeffectlabel.cpp +++ b/src/widgets/helper/rippleeffectlabel.cpp @@ -20,8 +20,6 @@ RippleEffectLabel::RippleEffectLabel(BaseWidget *parent, int spacing) this->hbox.addSpacing(spacing); this->hbox.addWidget(&this->label); this->hbox.addSpacing(spacing); - - // this->setMouseEffectColor(QColor(255, 255, 255, 63)); } } // namespace widgets