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
Multimedia
Kdenlive
Commits
d4ee47c2
Commit
d4ee47c2
authored
Apr 16, 2020
by
Jean-Baptiste Mardelle
Browse files
Adjust space to disable bin rating
parent
7f782123
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
d4ee47c2
...
...
@@ -114,10 +114,10 @@ public:
if
(
index
.
column
()
==
7
)
{
// Rating
QRect
rect
=
option
.
rect
;
rect
.
adjust
(
option
.
rect
.
width
()
/
1
4
,
0
,
0
,
0
);
rect
.
adjust
(
option
.
rect
.
width
()
/
1
2
,
0
,
0
,
0
);
int
rate
=
0
;
if
(
me
->
pos
().
x
()
>
rect
.
x
())
{
rate
=
KRatingPainter
::
getRatingFromPosition
(
rect
,
Qt
::
Align
Center
,
qApp
->
layoutDirection
(),
me
->
pos
());
rate
=
KRatingPainter
::
getRatingFromPosition
(
rect
,
Qt
::
Align
Left
,
qApp
->
layoutDirection
(),
me
->
pos
());
}
if
(
rate
>
-
1
)
{
// Full star rating only
...
...
@@ -342,8 +342,8 @@ 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
()
/
1
4
,
0
,
0
,
0
);
KRatingPainter
::
paintRating
(
painter
,
r1
,
Qt
::
Align
Center
,
index
.
data
().
toInt
());
r1
.
adjust
(
r1
.
width
()
/
1
2
,
0
,
0
,
0
);
KRatingPainter
::
paintRating
(
painter
,
r1
,
Qt
::
Align
Left
,
index
.
data
().
toInt
());
}
}
else
{
QStyledItemDelegate
::
paint
(
painter
,
option
,
index
);
...
...
Write
Preview
Markdown
is supported
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