Commit ea54c1c7 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

lsp gotosymboldialog: select first row + fix highlight color



For highlight color, editor color is used now. This fixes the look with
light color scheme and dark editor theme.
Signed-off-by: Waqar Ahmed's avatarWaqar Ahmed <waqar.17a@gmail.com>
(cherry picked from commit 11ed6456)
parent 1ad4463b
......@@ -198,8 +198,10 @@ void GotoSymbolHUDDialog::setPaletteToEditorColors()
auto e = KTextEditor::Editor::instance();
auto bg = QColor::fromRgba(e->theme().editorColor(KSyntaxHighlighting::Theme::BackgroundColor));
auto fg = QColor::fromRgba(e->theme().textColor(KSyntaxHighlighting::Theme::Normal));
auto hl = QColor::fromRgba(e->theme().editorColor(KSyntaxHighlighting::Theme::TextSelection));
pal.setColor(QPalette::Base, bg);
pal.setColor(QPalette::Text, fg);
pal.setColor(QPalette::Highlight, hl);
m_treeView.setPalette(pal);
}
......@@ -271,6 +273,7 @@ void GotoSymbolHUDDialog::slotTextChanged(const QString &text)
item->setData(QVariant::fromValue(GotoSymbolItem{sym.url, sym.range.start(), sym.kind}), SymbolInfoRole);
model->appendRow(item);
}
m_treeView.setCurrentIndex(model->index(0, 0));
};
server->workspaceSymbol(text, this, hh);
}
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