Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5e3eb47e
Commit
5e3eb47e
authored
May 04, 2010
by
Robert Loehning
Browse files
Using bold underlined font for active git branch.
parent
241d4712
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/git/branchmodel.cpp
View file @
5e3eb47e
...
...
@@ -30,6 +30,7 @@
#include
"branchmodel.h"
#include
"gitclient.h"
#include
<QtGui/QFont>
#include
<QtCore/QDebug>
#include
<QtCore/QRegExp>
#include
<QtCore/QTimer>
...
...
@@ -229,14 +230,16 @@ QVariant LocalBranchModel::data(const QModelIndex &index, int role) const
return
m_typeHere
;
case
Qt
::
ToolTipRole
:
return
m_typeHereToolTip
;
case
Qt
::
CheckStateRole
:
return
QVariant
(
false
);
}
return
QVariant
();
}
if
(
role
==
Qt
::
CheckStateRole
)
return
index
.
row
()
==
m_currentBranch
?
Qt
::
Checked
:
Qt
::
Unchecked
;
if
(
role
==
Qt
::
FontRole
&&
index
.
row
()
==
m_currentBranch
)
{
QFont
font
=
RemoteBranchModel
::
data
(
index
,
role
).
value
<
QFont
>
();
font
.
setBold
(
true
);
font
.
setUnderline
(
true
);
return
font
;
}
return
RemoteBranchModel
::
data
(
index
,
role
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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