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
Network
KTorrent
Commits
ed63f28f
Commit
ed63f28f
authored
Aug 03, 2021
by
Attila Török
Browse files
Change ProgressBar text color when selected
parent
00c04e8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ktorrent/view/viewdelegate.cpp
View file @
ed63f28f
...
...
@@ -334,6 +334,10 @@ void ViewDelegate::paintProgressBar(QPainter *painter, const QStyleOptionViewIte
progressBarOption
.
textVisible
=
true
;
progressBarOption
.
direction
=
option
.
direction
;
// ProgressBars have no concept of being selected (AFAIK), so the color of its text has to be changed manually
if
(
option
.
state
&
QStyle
::
State_Selected
)
progressBarOption
.
palette
.
setColor
(
QPalette
::
Active
,
QPalette
::
WindowText
,
option
.
palette
.
highlightedText
().
color
());
QApplication
::
style
()
->
drawControl
(
QStyle
::
CE_ProgressBar
,
&
progressBarOption
,
painter
);
}
...
...
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