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
Multimedia
Kdenlive
Commits
cb9ec9d8
Commit
cb9ec9d8
authored
Dec 30, 2019
by
Jean-Baptiste Mardelle
Browse files
cleaner drawing of rating background
parent
d854b4f2
Pipeline
#12691
passed with stage
in 15 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
cb9ec9d8
...
...
@@ -328,12 +328,13 @@ public:
painter
->
drawText
(
r1
,
Qt
::
AlignLeft
|
Qt
::
AlignTop
,
index
.
data
(
AbstractProjectItem
::
DataName
).
toString
(),
&
bounding
);
}
painter
->
restore
();
}
else
if
(
index
.
column
()
==
7
&&
!
index
.
data
().
isNull
()
)
{
}
else
if
(
index
.
column
()
==
7
)
{
QStyleOptionViewItem
opt
(
option
);
initStyleOption
(
&
opt
,
index
);
QRect
r1
=
opt
.
rect
;
QStyle
*
style
=
opt
.
widget
?
opt
.
widget
->
style
()
:
QApplication
::
style
();
style
->
drawPrimitive
(
QStyle
::
PE_PanelItemViewItem
,
&
opt
,
painter
,
opt
.
widget
);
if
((
option
.
state
&
static_cast
<
int
>
(
QStyle
::
State_Selected
))
!=
0
)
{
painter
->
fillRect
(
r1
,
option
.
palette
.
highlight
());
painter
->
setPen
(
option
.
palette
.
highlightedText
().
color
());
}
if
(
index
.
data
(
AbstractProjectItem
::
ItemTypeRole
).
toInt
()
!=
AbstractProjectItem
::
FolderItem
)
{
...
...
@@ -1822,6 +1823,7 @@ void Bin::slotInitView(QAction *action)
connect
(
m_proxyModel
.
get
(),
&
ProjectSortProxyModel
::
updateRating
,
[
&
]
(
const
QModelIndex
&
ix
,
uint
rating
)
{
const
QModelIndex
index
=
m_proxyModel
->
mapToSource
(
ix
);
std
::
shared_ptr
<
AbstractProjectItem
>
item
=
m_itemModel
->
getBinItemByIndex
(
index
);
if
(
item
)
{
item
->
setRating
(
rating
);
emit
m_itemModel
->
dataChanged
(
index
,
index
,
{
AbstractProjectItem
::
DataRating
});
...
...
Eugen Mohr
@emohr
mentioned in issue
#287
·
Dec 30, 2019
mentioned in issue
#287
mentioned in issue #287
Toggle commit list
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