X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.h;h=023808e7a749614dfbbe865357162bbf68cbc603;hb=12028f7dfb31ebf5694f5dae95bfc31bcde83b43;hp=28ba40546973366102107800e0c413dfd429a50a;hpb=e6f810169117c836c22ae1146e469e61dec95f6f;p=quassel.git diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index 28ba4054..023808e7 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -81,7 +81,7 @@ public: Bold = 0x00000100, Italic = 0x00000200, Underline = 0x00000400, - Reverse = 0x00000800, + Strikethrough = 0x00000800, // Individual parts of a message Timestamp = 0x00001000, @@ -128,6 +128,11 @@ public: Invalid = 0xffffffff }; + enum class FormatProperty { + AllowForegroundOverride = QTextFormat::UserProperty, + AllowBackgroundOverride + }; + enum class ColorRole { MarkerLine, // Sender colors (16 + self) @@ -266,11 +271,12 @@ protected: void loadStyleSheet(); QString loadStyleSheet(const QString &name, bool shouldExist = false); - QTextCharFormat format(quint64 key) const; + QTextCharFormat parsedFormat(quint64 key) const; QTextCharFormat cachedFormat(const Format &format, MessageLabel messageLabel) const; void setCachedFormat(const QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const; void mergeFormat(QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const; void mergeSubElementFormat(QTextCharFormat &charFormat, FormatType formatType, MessageLabel messageLabel) const; + void mergeColors(QTextCharFormat &charFormat, const Format &format, MessageLabel messageLabel) const; static FormatType formatType(const QString &code); static QString formatCode(FormatType);