summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-25 06:00:00 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-25 06:00:11 (GMT)
commit07b9ee5f15670232280d1f813e5807dd03034e92 (patch)
tree06c21c543abfc93ca120c43bdf267b62be415641
parent18f79eb5634c167fc6dc4465f3d917f10aceb64d (diff)
Adapt to new api
-rw-r--r--messageviewer/src/widgets/mailsourcewebengineviewer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/messageviewer/src/widgets/mailsourcewebengineviewer.cpp b/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
index bf2ca52..0d8f41c 100644
--- a/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
+++ b/messageviewer/src/widgets/mailsourcewebengineviewer.cpp
@@ -75,10 +75,9 @@ MailSourceWebEngineViewer::MailSourceWebEngineViewer(QWidget *parent)
def = mRepo.definitionForName(QStringLiteral("HTML"));
SyntaxHighlighting::SyntaxHighlighter *hl = new SyntaxHighlighting::SyntaxHighlighter(mHtmlBrowser->textBrowser()->document());
- hl->setTheme((mHtmlBrowser->textBrowser()->palette().color(QPalette::Base).lightness() < 128)
- ? mRepo.theme(QLatin1String("Breeze Dark"))
- : mRepo.theme(QLatin1String("Default")));
-
+ hl->setTheme((palette().color(QPalette::Base).lightness() < 128)
+ ? mRepo.defaultTheme(SyntaxHighlighting::Repository::DarkTheme)
+ : mRepo.defaultTheme(SyntaxHighlighting::Repository::LightTheme));
hl->setDefinition(def);
#else
new KPIMTextEdit::HtmlHighlighter(mHtmlBrowser->textBrowser()->document());