Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
f36ea678
Commit
f36ea678
authored
Mar 24, 2009
by
Thorbjørn Lindeijer
Browse files
Allow configuring the color for the hover links
Cause blue doesn't fit nicely in all color schemes.
parent
0729ae01
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
f36ea678
...
...
@@ -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
));
}
...
...
src/plugins/cppeditor/cppeditor.h
View file @
f36ea678
...
...
@@ -151,6 +151,7 @@ private:
Link
findLinkAt
(
const
QTextCursor
&
);
static
Link
linkToSymbol
(
CPlusPlus
::
Symbol
*
symbol
);
bool
openCppEditorAt
(
const
Link
&
);
QTextCharFormat
m_linkFormat
;
CppTools
::
CppModelManagerInterface
*
m_modelManager
;
...
...
src/plugins/texteditor/basetexteditor.h
View file @
f36ea678
...
...
@@ -27,7 +27,6 @@
**
**************************************************************************/
#ifndef BASETEXTEDITOR_H
#define BASETEXTEDITOR_H
...
...
@@ -42,7 +41,6 @@
QT_BEGIN_NAMESPACE
class
QLabel
;
class
QTextCharFormat
;
class
QToolBar
;
QT_END_NAMESPACE
...
...
src/plugins/texteditor/texteditorconstants.h
View file @
f36ea678
...
...
@@ -65,6 +65,7 @@ const char * const C_TEXTEDITOR_MIMETYPE_XML = "application/xml";
// Text color and style categories
const
char
*
const
C_TEXT
=
"Text"
;
const
char
*
const
C_LINK
=
"Link"
;
const
char
*
const
C_SELECTION
=
"Selection"
;
const
char
*
const
C_LINE_NUMBER
=
"LineNumber"
;
const
char
*
const
C_SEARCH_RESULT
=
"SearchResult"
;
...
...
src/plugins/texteditor/texteditorsettings.cpp
View file @
f36ea678
...
...
@@ -65,6 +65,7 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
// Special categories
const
QPalette
p
=
QApplication
::
palette
();
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_LINK
),
tr
(
"Link"
),
Qt
::
blue
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_SELECTION
),
tr
(
"Selection"
),
p
.
color
(
QPalette
::
HighlightedText
)));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_LINE_NUMBER
),
tr
(
"Line Number"
)));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_SEARCH_RESULT
),
tr
(
"Search Result"
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment