Commit 98faf01f authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix color loading for LSP client plugin

parent 66229118
......@@ -39,8 +39,8 @@ LSPClientConfigPage::LSPClientConfigPage(QWidget *parent, LSPClientPlugin *plugi
const auto theme = (palette().color(QPalette::Base).lightness() < 128) ? m_repository.defaultTheme(KSyntaxHighlighting::Repository::DarkTheme) : m_repository.defaultTheme(KSyntaxHighlighting::Repository::LightTheme);
auto pal = qApp->palette();
if (theme.isValid()) {
pal.setColor(QPalette::Base, theme.editorColor(KSyntaxHighlighting::Theme::BackgroundColor));
pal.setColor(QPalette::Highlight, theme.editorColor(KSyntaxHighlighting::Theme::TextSelection));
pal.setColor(QPalette::Base, QColor::fromRgba(theme.editorColor(KSyntaxHighlighting::Theme::BackgroundColor)));
pal.setColor(QPalette::Highlight, QColor::fromRgba(theme.editorColor(KSyntaxHighlighting::Theme::TextSelection)));
}
textEdit->setPalette(pal);
highlighter->setTheme(theme);
......
......@@ -868,7 +868,7 @@ public:
break;
}
if (activeView) {
attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->foreground().color());
attr->setForeground(activeView->defaultStyleAttribute(KTextEditor::dsNormal)->foreground());
}
// highlight the range
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment