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
2c5a99e2
Commit
2c5a99e2
authored
Aug 26, 2019
by
Bruno Santos
Committed by
Jean-Baptiste Mardelle
Aug 26, 2019
Browse files
Fix rgbparade showing line value on mouse hover (
#304
)
parent
3a2cce33
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scopes/colorscopes/rgbparade.cpp
View file @
2c5a99e2
...
...
@@ -111,14 +111,19 @@ QImage RGBParade::renderHUD(uint)
// Make the value stick to the line unless it is at the top/bottom of the scope
const
int
top
=
30
;
const
int
bottom
=
20
+
RGBParadeGenerator
::
distBottom
;
int
valY
=
y
+
5
;
if
(
valY
<
top
)
{
valY
=
top
;
}
else
if
(
valY
>
scopeRect
().
height
()
-
bottom
)
{
valY
=
scopeRect
().
height
()
-
bottom
;
}
int
val
=
255
*
(
int
)(
1.
-
((
float
)
y
/
(
float
)(
scopeRect
().
height
()
-
RGBParadeGenerator
::
distBottom
)));
davinci
.
drawText
(
x
,
valY
,
QVariant
(
val
).
toString
());
int
val
=
255
+
int
(
255.
*
(
1.
-
(
float
)
y
)
/
((
float
)
scopeRect
().
height
()
-
RGBParadeGenerator
::
distBottom
));
if
((
val
>=
0
)
&&
(
val
<=
255
))
{
davinci
.
drawText
(
x
,
valY
,
QVariant
(
val
).
toString
());
}
}
emit
signalHUDRenderingFinished
(
1
,
1
);
...
...
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