diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2020-05-12 11:11:54 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2020-05-12 13:36:42 +0000 |
commit | 9c1e8a99d8a99ca7d5d8c7026084442290e178f9 (patch) | |
tree | 96f01bf052b3c630e1f415faaec6d583d31fe280 /src/plugins/vcsbase | |
parent | f480cf2c443709c343147aea04f93e3ca53a2701 (diff) |
VcsBaseEditor: Make link colors theme-aware
Change-Id: I5323e0cd236276a5a74e7c55f81d9d9c9795d295
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r-- | src/plugins/vcsbase/vcsbaseeditor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 0f334b7f13..f94b08ffb1 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -443,14 +443,15 @@ bool UrlTextCursorHandler::findContentsUnderCursor(const QTextCursor &cursor) void UrlTextCursorHandler::highlightCurrentContents() { + const QColor linkColor = creatorTheme()->color(Theme::TextColorLink); QTextEdit::ExtraSelection sel; sel.cursor = currentCursor(); sel.cursor.setPosition(currentCursor().position() - (currentCursor().columnNumber() - m_urlData.startColumn)); sel.cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, m_urlData.url.length()); sel.format.setFontUnderline(true); - sel.format.setForeground(Qt::blue); - sel.format.setUnderlineColor(Qt::blue); + sel.format.setForeground(linkColor); + sel.format.setUnderlineColor(linkColor); sel.format.setProperty(QTextFormat::UserProperty, m_urlData.url); editorWidget()->setExtraSelections(VcsBaseEditorWidget::OtherSelection, QList<QTextEdit::ExtraSelection>() << sel); |