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};
BoolSetting enableWhisperHighlightTaskbar = {
"/highlighting/whisperHighlight/enableTaskbarFlashing", false};
QStringSetting highlightColor = {"/highlighting/color", "#4B282C"};
QStringSetting highlightColor = {"/highlighting/color", ""};
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.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,10 +83,15 @@ void Theme::actuallyUpdate(double hue, double multiplier)
this->splits.dropPreviewBorder = QColor(0, 148, 255, 0xff);
// 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 =
QColor(getSettings()->highlightColor);
}
}
void Theme::normalizeColor(QColor &color)
{
if (this->isLightTheme())