Quick fix for highlighting in light themes

set defaults for highlighting colors. Only use "hidden setting" when populated.
This commit is contained in:
TranRed 2019-04-22 18:32:58 +02:00
parent ad38d0ca1c
commit ac1957ff68
2 changed files with 17 additions and 3 deletions

View file

@ -144,7 +144,7 @@ public:
"/highlighting/whisperHighlight/enableSound", false}; "/highlighting/whisperHighlight/enableSound", false};
BoolSetting enableWhisperHighlightTaskbar = { BoolSetting enableWhisperHighlightTaskbar = {
"/highlighting/whisperHighlight/enableTaskbarFlashing", false}; "/highlighting/whisperHighlight/enableTaskbarFlashing", false};
QStringSetting highlightColor = {"/highlighting/color", "#4B282C"}; QStringSetting highlightColor = {"/highlighting/color", ""};
BoolSetting longAlerts = {"/highlighting/alerts", false}; BoolSetting longAlerts = {"/highlighting/alerts", false};

View file

@ -38,6 +38,10 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.resizeHandle = QColor(0, 148, 255, 0xff); this->splits.resizeHandle = QColor(0, 148, 255, 0xff);
this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x50); this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x50);
// Highlighted Messages: theme support quick-fix
this->messages.backgrounds.highlighted =
QColor("#BD8489");
} }
else else
{ {
@ -46,6 +50,11 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.resizeHandle = QColor(0, 148, 255, 0x70); this->splits.resizeHandle = QColor(0, 148, 255, 0x70);
this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x20); this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x20);
// Highlighted Messages: theme support quick-fix
this->messages.backgrounds.highlighted =
QColor("#4B282C");
} }
this->splits.header.background = getColor(0, sat, flat ? 1 : 0.9); this->splits.header.background = getColor(0, sat, flat ? 1 : 0.9);
@ -74,8 +83,13 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff); this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff);
// Highlighted Messages // Highlighted Messages
// hidden setting from PR #744 - if set it will overwrite theme color (for now!)
//TODO: implement full theme support
if (getSettings()->highlightColor != "") {
this->messages.backgrounds.highlighted = this->messages.backgrounds.highlighted =
QColor(getSettings()->highlightColor); QColor(getSettings()->highlightColor);
}
} }
void Theme::normalizeColor(QColor &color) void Theme::normalizeColor(QColor &color)