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
Utilities
Kate
Commits
72517fc3
Commit
72517fc3
authored
Feb 10, 2021
by
Waqar Ahmed
Browse files
Mark branch creation items as bold
parent
5690d499
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/branchesdialog.cpp
View file @
72517fc3
...
...
@@ -98,13 +98,16 @@ public:
using
RefType
=
GitUtils
::
RefType
;
const
auto
fontSz
=
option
.
font
.
pointSize
();
name
=
QStringLiteral
(
"<span style=
\"
font-size:%1pt;
\"
>"
).
arg
(
fontSz
)
+
name
+
QStringLiteral
(
"</span>"
);
if
(
itemType
==
BranchesDialogModel
::
BranchItem
&&
refType
==
RefType
::
Head
)
{
name
.
append
(
QStringLiteral
(
" <span style=
\"
color:gray; font-size:%1pt;
\"
>local</span>"
).
arg
(
fontSz
-
1
));
}
else
if
(
itemType
==
BranchesDialogModel
::
BranchItem
&&
refType
==
RefType
::
Remote
)
{
name
.
append
(
QStringLiteral
(
" <span style=
\"
color:gray; font-size:%1pt;
\"
>remote</span>"
).
arg
(
fontSz
-
1
));
}
/*else if (type == RefType::Tag) {
name.append(QStringLiteral(" <span style=\"color:gray; font-size:%1pt;\">tag at %2</span>").arg(fontSz));
} */
if
(
itemType
==
BranchesDialogModel
::
CreateBranch
||
itemType
==
BranchesDialogModel
::
CreateBranchFrom
)
{
name
.
prepend
(
QStringLiteral
(
"+ <b>"
)).
append
(
QStringLiteral
(
"</b>"
));
}
else
{
if
(
refType
==
RefType
::
Head
)
{
name
.
append
(
QStringLiteral
(
" <span style=
\"
color:gray; font-size:%1pt;
\"
>local</span>"
).
arg
(
fontSz
-
1
));
}
else
if
(
refType
==
RefType
::
Remote
)
{
name
.
append
(
QStringLiteral
(
" <span style=
\"
color:gray; font-size:%1pt;
\"
>remote</span>"
).
arg
(
fontSz
-
1
));
}
}
doc
.
setHtml
(
name
);
doc
.
setDocumentMargin
(
2
);
...
...
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