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
3f1525e7
Commit
3f1525e7
authored
Apr 14, 2020
by
Jean-Baptiste Mardelle
Browse files
Bin rating: reserve some space to reset to 0 stars
parent
6fdc79fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
3f1525e7
...
...
@@ -113,7 +113,12 @@ public:
dragType
=
PlaylistState
::
Disabled
;
if
(
index
.
column
()
==
7
)
{
// Rating
int
rate
=
KRatingPainter
::
getRatingFromPosition
(
option
.
rect
,
Qt
::
AlignCenter
,
qApp
->
layoutDirection
(),
me
->
pos
());
QRect
rect
=
option
.
rect
;
rect
.
adjust
(
option
.
rect
.
width
()
/
14
,
0
,
0
,
0
);
int
rate
=
0
;
if
(
me
->
pos
().
x
()
>
rect
.
x
())
{
rate
=
KRatingPainter
::
getRatingFromPosition
(
rect
,
Qt
::
AlignCenter
,
qApp
->
layoutDirection
(),
me
->
pos
());
}
if
(
rate
>
-
1
)
{
// Full star rating only
if
(
rate
%
2
==
1
)
{
...
...
@@ -337,6 +342,7 @@ public:
style
->
drawPrimitive
(
QStyle
::
PE_PanelItemViewItem
,
&
opt
,
painter
,
opt
.
widget
);
painter
->
setOpacity
(
1
);
if
(
index
.
data
(
AbstractProjectItem
::
ItemTypeRole
).
toInt
()
!=
AbstractProjectItem
::
FolderItem
)
{
r1
.
adjust
(
r1
.
width
()
/
14
,
0
,
0
,
0
);
KRatingPainter
::
paintRating
(
painter
,
r1
,
Qt
::
AlignCenter
,
index
.
data
().
toInt
());
}
}
else
{
...
...
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