In order to make the appearance of hovered-upon URLs controllable
by stylesheet, add support for a new message label "hovered".
Extend the default stylesheet to underline hovered-upon URLs.
allow-background-override: false;
}
allow-background-override: false;
}
+ChatLine[label="hovered"] {
+ font-style: underline;
+}
+
// ChatLine::sender[sender="self"] {
// font-style: italic;
// }
// ChatLine::sender[sender="self"] {
// font-style: italic;
// }
label |= MessageLabel::Highlight;
else if (condValue == "selected")
label |= MessageLabel::Selected;
label |= MessageLabel::Highlight;
else if (condValue == "selected")
label |= MessageLabel::Selected;
+ else if (condValue == "hovered")
+ label |= MessageLabel::Hovered;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message label: %1").arg(condValue);
return invalid;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message label: %1").arg(condValue);
return invalid;
// Merge all formats except mIRC and extended colors
mergeFormat(charFormat, format, label & 0xffff0000); // keep nickhash in label
// Merge all formats except mIRC and extended colors
mergeFormat(charFormat, format, label & 0xffff0000); // keep nickhash in label
- for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Selected); mask <<= 1) {
+ for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Last); mask <<= 1) {
if (static_cast<quint32>(label) & mask) {
mergeFormat(charFormat, format, label & (mask | 0xffff0000));
}
if (static_cast<quint32>(label) & mask) {
mergeFormat(charFormat, format, label & (mask | 0xffff0000));
}
// unless the AllowForegroundOverride or AllowBackgroundOverride properties are set (via stylesheet).
if (_allowMircColors) {
mergeColors(charFormat, format, MessageLabel::None);
// unless the AllowForegroundOverride or AllowBackgroundOverride properties are set (via stylesheet).
if (_allowMircColors) {
mergeColors(charFormat, format, MessageLabel::None);
- for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Selected); mask <<= 1) {
+ for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Last); mask <<= 1) {
if (static_cast<quint32>(label) & mask) {
mergeColors(charFormat, format, label & mask);
}
if (static_cast<quint32>(label) & mask) {
mergeColors(charFormat, format, label & mask);
}
None = 0x00000000,
OwnMsg = 0x00000001,
Highlight = 0x00000002,
None = 0x00000000,
OwnMsg = 0x00000001,
Highlight = 0x00000002,
- Selected = 0x00000004 // must be last!
+ Selected = 0x00000004,
+ Hovered = 0x00000008,
+ Last = Hovered
};
enum class ItemFormatType : quint32 {
};
enum class ItemFormatType : quint32 {