Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
a01bc353
Commit
a01bc353
authored
Jan 27, 2022
by
Laurent Montel
Browse files
Avoid to recreate KColorScheme when read another email
parent
23c08bb2
Pipeline
#129391
passed with stage
in 14 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp
View file @
a01bc353
...
...
@@ -39,11 +39,13 @@ QString EnterpriseHeaderStyle::format(KMime::Message *message) const
// colors depend on if it is encapsulated or not
QColor
fontColor
(
Qt
::
white
);
QString
linkColor
=
QStringLiteral
(
"class =
\"
white
\"
"
);
const
QColor
activeColor
=
KColorScheme
(
QPalette
::
Active
,
KColorScheme
::
Selection
).
background
().
color
();
QColor
activeColorDark
=
activeColor
.
darker
(
130
);
if
(
!
mActiveColor
.
isValid
())
{
mActiveColor
=
KColorScheme
(
QPalette
::
Active
,
KColorScheme
::
Selection
).
background
().
color
();
}
QColor
activeColorDark
=
mActiveColor
.
darker
(
130
);
// reverse colors for encapsulated
if
(
!
isTopLevel
())
{
activeColorDark
=
a
ctiveColor
.
darker
(
50
);
activeColorDark
=
mA
ctiveColor
.
darker
(
50
);
fontColor
=
QColor
(
Qt
::
black
);
linkColor
=
QStringLiteral
(
"class =
\"
black
\"
"
);
}
...
...
plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.h
View file @
a01bc353
...
...
@@ -22,9 +22,10 @@ public:
const
char
*
name
()
const
override
;
QString
format
(
KMime
::
Message
*
message
)
const
override
;
Q_REQUIRED_RESULT
QString
format
(
KMime
::
Message
*
message
)
const
override
;
private:
mutable
QColor
mActiveColor
;
MessageViewer
::
HeaderStyleUtil
mHeaderStyleUtil
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment