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
d623ed40
Commit
d623ed40
authored
Feb 24, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix align and center icon in geometry param
parent
002ffdf8
Pipeline
#15591
passed with stage
in 13 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/geometrywidget.cpp
View file @
d623ed40
...
...
@@ -196,29 +196,24 @@ void GeometryWidget::slotAdjustToFrameSize()
{
double
monitorDar
=
pCore
->
getCurrentDar
();
double
sourceDar
=
m_sourceSize
.
width
()
/
m_sourceSize
.
height
();
m_spinWidth
->
blockSignals
(
true
);
m_spinHeight
->
blockSignals
(
true
);
QSignalBlocker
bk1
(
m_spinWidth
);
QSignalBlocker
bk2
(
m_spinHeight
);
if
(
sourceDar
>
monitorDar
)
{
// Fit to width
double
factor
=
(
double
)
m_defaultSize
.
width
()
/
m_sourceSize
.
width
()
*
pCore
->
getCurrentSar
();
m_spinHeight
->
setValue
((
int
)(
m_sourceSize
.
height
()
*
factor
+
0.5
));
m_spinWidth
->
setValue
(
m_defaultSize
.
width
());
// Center
m_spinY
->
blockSignals
(
true
);
m_spinY
->
setValue
((
m_defaultSize
.
height
()
-
m_spinHeight
->
value
())
/
2
);
m_spinY
->
blockSignals
(
false
);
}
else
{
// Fit to height
double
factor
=
(
double
)
m_defaultSize
.
height
()
/
m_sourceSize
.
height
();
m_spinHeight
->
setValue
(
m_defaultSize
.
height
());
m_spinWidth
->
setValue
((
int
)(
m_sourceSize
.
width
()
/
pCore
->
getCurrentSar
()
*
factor
+
0.5
));
// Center
m_spinX
->
blockSignals
(
true
);
m_spinX
->
setValue
((
m_defaultSize
.
width
()
-
m_spinWidth
->
value
())
/
2
);
m_spinX
->
blockSignals
(
false
);
}
m_spinWidth
->
blockSignals
(
false
);
m_spinHeight
->
blockSignals
(
false
);
// Center
QSignalBlocker
bk3
(
m_spinX
);
QSignalBlocker
bk4
(
m_spinY
);
m_spinX
->
setValue
((
m_defaultSize
.
width
()
-
m_spinWidth
->
value
())
/
2
);
m_spinY
->
setValue
((
m_defaultSize
.
height
()
-
m_spinHeight
->
value
())
/
2
);
slotAdjustRectKeyframeValue
();
}
...
...
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