Allow configuring the color for the hover links

Cause blue doesn't fit nicely in all color schemes.
This commit is contained in:
Thorbjørn Lindeijer
2009-03-24 16:36:22 +01:00
parent 0729ae0191
commit f36ea6785c
5 changed files with 7 additions and 4 deletions

View File

@@ -236,7 +236,7 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable)
policy.setHorizontalPolicy(QSizePolicy::Expanding);
m_methodCombo->setSizePolicy(policy);
QTreeView *methodView = new OverviewTreeView();
QTreeView *methodView = new OverviewTreeView;
methodView->header()->hide();
methodView->setItemsExpandable(false);
m_methodCombo->setView(methodView);
@@ -833,8 +833,8 @@ void CPPEditor::mouseMoveEvent(QMouseEvent *e)
} else {
sel.cursor.select(QTextCursor::WordUnderCursor);
}
sel.format = m_linkFormat;
sel.format.setFontUnderline(true);
sel.format.setForeground(Qt::blue);
setExtraSelections(OtherSelection, QList<QTextEdit::ExtraSelection>() << sel);
hasDestination = true;
cursorShape = Qt::PointingHandCursor;
@@ -921,6 +921,8 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
const QVector<QTextCharFormat> formats = fs.toTextCharFormats(categories);
highlighter->setFormats(formats.constBegin(), formats.constEnd());
highlighter->rehighlight();
m_linkFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_LINK));
}