Added option to highlight your own messages (#3833)
* Removed magic numbers when checking rowIndex * Swap from static ints to enum * Referred enum members by enum name * Fixed formatting * Added highlight option for self messages * Update CHANGELOG.md * Made disabled by default * Moved setting from Messages tab to Users tab * Moved checks to HighlightController * Set row index to 0 sillE silly me * Update CHANGELOG.md * Moved check outside of loop * Improved naming and documentation on variables * Fixed formatting * Fix compile errors * Update ColorProvider self message highlight color when it's changed Use the ColorProvider self message highlight color instead of rolling our own non-updating color * Update changelog entry * Remove unused `customColor` from user highlights builder * Use explicit lambda capture * Update comment for the color provider color * HighlightModelHpp: Future-proof custom row enum B) * Document UserHighlightModel color changes * Update colorprovider comment * Update enabled, show in mentions & color setting paths * Rename settings from `selfMessagesHighlight` to `selfMessageHighlight` --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -81,6 +81,20 @@ void ColorProvider::initTypeColorMap()
|
||||
HighlightPhrase::FALLBACK_HIGHLIGHT_COLOR)});
|
||||
}
|
||||
|
||||
customColor = getSettings()->selfMessageHighlightColor;
|
||||
if (QColor(customColor).isValid())
|
||||
{
|
||||
this->typeColorMap_.insert({ColorType::SelfMessageHighlight,
|
||||
std::make_shared<QColor>(customColor)});
|
||||
}
|
||||
else
|
||||
{
|
||||
this->typeColorMap_.insert(
|
||||
{ColorType::SelfMessageHighlight,
|
||||
std::make_shared<QColor>(
|
||||
HighlightPhrase::FALLBACK_SELF_MESSAGE_HIGHLIGHT_COLOR)});
|
||||
}
|
||||
|
||||
customColor = getSettings()->subHighlightColor;
|
||||
if (QColor(customColor).isValid())
|
||||
{
|
||||
|
||||
@@ -16,6 +16,8 @@ enum class ColorType {
|
||||
FirstMessageHighlight,
|
||||
ElevatedMessageHighlight,
|
||||
ThreadMessageHighlight,
|
||||
// Used in automatic highlights of your own messages
|
||||
SelfMessageHighlight,
|
||||
};
|
||||
|
||||
class ColorProvider
|
||||
|
||||
Reference in New Issue
Block a user