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
+1 -1
View File
@@ -144,7 +144,7 @@ public:
"/highlighting/whisperHighlight/enableSound", false};
BoolSetting enableWhisperHighlightTaskbar = {
"/highlighting/whisperHighlight/enableTaskbarFlashing", false};
QStringSetting highlightColor = {"/highlighting/color", "#4B282C"};
QStringSetting highlightColor = {"/highlighting/color", ""};
BoolSetting longAlerts = {"/highlighting/alerts", false};
+16 -2
View File
@@ -38,6 +38,10 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.resizeHandle = QColor(0, 148, 255, 0xff);
this->splits.resizeHandleBackground = QColor(0, 148, 255, 0x50);
// Highlighted Messages: theme support quick-fix
this->messages.backgrounds.highlighted =
QColor("#BD8489");
}
else
{
@@ -46,6 +50,11 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.resizeHandle = QColor(0, 148, 255, 0x70);
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);
@@ -74,8 +83,13 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff);
// Highlighted Messages
this->messages.backgrounds.highlighted =
QColor(getSettings()->highlightColor);
// 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 =
QColor(getSettings()->highlightColor);
}
}
void Theme::normalizeColor(QColor &color)