Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
992a178b
Commit
992a178b
authored
Jun 12, 2009
by
Thorbjørn Lindeijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply bold to the current line number by default
parent
7403fe68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
src/plugins/texteditor/fontsettings.cpp
src/plugins/texteditor/fontsettings.cpp
+2
-0
src/plugins/texteditor/fontsettingspage.cpp
src/plugins/texteditor/fontsettingspage.cpp
+6
-5
src/plugins/texteditor/fontsettingspage.h
src/plugins/texteditor/fontsettingspage.h
+3
-4
src/plugins/texteditor/texteditorsettings.cpp
src/plugins/texteditor/texteditorsettings.cpp
+4
-1
No files found.
src/plugins/texteditor/fontsettings.cpp
View file @
992a178b
...
...
@@ -201,6 +201,8 @@ bool FontSettings::fromSettings(const QString &category,
if
(
fmt
.
isEmpty
())
{
m_formats
[
name
].
setForeground
(
desc
.
foreground
());
m_formats
[
name
].
setBackground
(
desc
.
background
());
m_formats
[
name
].
setBold
(
desc
.
format
().
bold
());
m_formats
[
name
].
setItalic
(
desc
.
format
().
italic
());
}
else
{
m_formats
[
name
].
fromString
(
fmt
);
}
...
...
src/plugins/texteditor/fontsettingspage.cpp
View file @
992a178b
...
...
@@ -101,10 +101,16 @@ FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescrip
if
(
!
settingsFound
)
{
// Apply defaults
foreach
(
const
FormatDescription
&
f
,
m_descriptions
)
{
const
QString
name
=
f
.
name
();
m_lastValue
.
formatFor
(
name
).
setForeground
(
f
.
foreground
());
m_lastValue
.
formatFor
(
name
).
setBackground
(
f
.
background
());
m_lastValue
.
formatFor
(
name
).
setBold
(
f
.
format
().
bold
());
m_lastValue
.
formatFor
(
name
).
setItalic
(
f
.
format
().
italic
());
m_value
.
formatFor
(
name
).
setForeground
(
f
.
foreground
());
m_value
.
formatFor
(
name
).
setBackground
(
f
.
background
());
m_value
.
formatFor
(
name
).
setBold
(
f
.
format
().
bold
());
m_value
.
formatFor
(
name
).
setItalic
(
f
.
format
().
italic
());
}
}
...
...
@@ -144,11 +150,6 @@ QColor FormatDescription::foreground() const
return
m_format
.
foreground
();
}
void
FormatDescription
::
setForeground
(
const
QColor
&
foreground
)
{
m_format
.
setForeground
(
foreground
);
}
QColor
FormatDescription
::
background
()
const
{
if
(
m_name
==
QLatin1String
(
Constants
::
C_TEXT
))
...
...
src/plugins/texteditor/fontsettingspage.h
View file @
992a178b
...
...
@@ -60,14 +60,13 @@ public:
const
QColor
&
foreground
=
Qt
::
black
);
QString
name
()
const
;
QString
trName
()
const
;
QColor
foreground
()
const
;
void
setForeground
(
const
QColor
&
foreground
);
QColor
background
()
const
;
const
Format
&
format
()
const
{
return
m_format
;
}
Format
&
format
()
{
return
m_format
;
}
private:
QString
m_name
;
// Name of the category
QString
m_trName
;
// Displayed name of the category
...
...
src/plugins/texteditor/texteditorsettings.cpp
View file @
992a178b
...
...
@@ -72,7 +72,10 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_SEARCH_SCOPE
),
tr
(
"Search Scope"
)));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_PARENTHESES
),
tr
(
"Parentheses"
)));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_CURRENT_LINE
),
tr
(
"Current Line"
)));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_CURRENT_LINE_NUMBER
),
tr
(
"Current Line Number"
),
Qt
::
darkGray
));
FormatDescription
currentLineNumber
=
FormatDescription
(
QLatin1String
(
C_CURRENT_LINE_NUMBER
),
tr
(
"Current Line Number"
),
Qt
::
darkGray
);
currentLineNumber
.
format
().
setBold
(
true
);
formatDescriptions
.
push_back
(
currentLineNumber
);
// Standard categories
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_NUMBER
),
tr
(
"Number"
),
Qt
::
darkBlue
));
...
...
Write
Preview
Markdown
is supported
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