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
fb0e09ba
Commit
fb0e09ba
authored
Jan 16, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix lift value incorrect on click
BUG: 431676
parent
3b5b1d4f
Changes
2
Show whitespace changes
Inline
Side-by-side
src/assets/view/widgets/colorwheel.cpp
View file @
fb0e09ba
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <QVBoxLayout>
#include <QVBoxLayout>
#include <QDoubleSpinBox>
#include <QDoubleSpinBox>
#include <QLabel>
#include <QLabel>
#include <QDebug>
#include <QFontDatabase>
#include <QFontDatabase>
#include <qmath.h>
#include <qmath.h>
...
@@ -198,9 +199,11 @@ NegQColor WheelContainer::colorForPoint(const QPointF &point)
...
@@ -198,9 +199,11 @@ NegQColor WheelContainer::colorForPoint(const QPointF &point)
}
}
if
(
m_isInSquare
)
{
if
(
m_isInSquare
)
{
qreal
value
=
1.0
-
qreal
(
point
.
y
()
-
m_margin
)
/
(
wheelSize
()
-
m_margin
*
2
);
qreal
value
=
1.0
-
qreal
(
point
.
y
()
-
m_margin
)
/
(
wheelSize
()
-
m_margin
*
2
);
qDebug
()
<<
"== CLICK VALIE: "
<<
value
;
if
(
!
qFuzzyCompare
(
m_zeroShift
,
0.
))
{
if
(
!
qFuzzyCompare
(
m_zeroShift
,
0.
))
{
value
=
value
-
m_zeroShift
;
value
=
value
-
m_zeroShift
;
}
}
qDebug
()
<<
"== CLICK VALIE AFTER SHIFT: "
<<
value
<<
", SIZE F: "
<<
m_sizeFactor
;
return
NegQColor
::
fromHsvF
(
m_color
.
hueF
(),
m_color
.
saturationF
(),
value
);
return
NegQColor
::
fromHsvF
(
m_color
.
hueF
(),
m_color
.
saturationF
(),
value
);
}
}
return
{};
return
{};
...
...
src/assets/view/widgets/lumaliftgainparam.cpp
View file @
fb0e09ba
...
@@ -59,7 +59,7 @@ LumaLiftGainParam::LumaLiftGainParam(std::shared_ptr<AssetParameterModel> model,
...
@@ -59,7 +59,7 @@ LumaLiftGainParam::LumaLiftGainParam(std::shared_ptr<AssetParameterModel> model,
connect
(
this
,
&
LumaLiftGainParam
::
liftChanged
,
[
this
,
indexes
]()
{
connect
(
this
,
&
LumaLiftGainParam
::
liftChanged
,
[
this
,
indexes
]()
{
NegQColor
liftColor
=
m_lift
->
color
();
NegQColor
liftColor
=
m_lift
->
color
();
QList
<
QModelIndex
>
ixes
{
indexes
.
value
(
QStringLiteral
(
"lift_r"
)),
indexes
.
value
(
QStringLiteral
(
"lift_g"
)),
indexes
.
value
(
QStringLiteral
(
"lift_b"
))};
QList
<
QModelIndex
>
ixes
{
indexes
.
value
(
QStringLiteral
(
"lift_r"
)),
indexes
.
value
(
QStringLiteral
(
"lift_g"
)),
indexes
.
value
(
QStringLiteral
(
"lift_b"
))};
QStringList
values
{
QString
::
number
(
liftColor
.
redF
(),
'f'
),
QString
::
number
(
liftColor
.
greenF
(),
'f'
),
QString
::
number
(
liftColor
.
blueF
(),
'f'
)};
QStringList
values
{
QString
::
number
(
liftColor
.
redF
()
*
LIFT_FACTOR
,
'f'
),
QString
::
number
(
liftColor
.
greenF
()
*
LIFT_FACTOR
,
'f'
),
QString
::
number
(
liftColor
.
blueF
()
*
LIFT_FACTOR
,
'f'
)};
emit
valuesChanged
(
ixes
,
values
,
true
);
emit
valuesChanged
(
ixes
,
values
,
true
);
});
});
connect
(
this
,
&
LumaLiftGainParam
::
gammaChanged
,
[
this
,
indexes
]()
{
connect
(
this
,
&
LumaLiftGainParam
::
gammaChanged
,
[
this
,
indexes
]()
{
...
...
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