Apply stories fade in raster renderer.
This commit is contained in:
parent
30871ed116
commit
0d3df824e3
|
@ -76,7 +76,7 @@ void OverlayWidget::RendererSW::paintTransformedVideoFrame(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
paintTransformedImage(_owner->videoFrame(), rect, rotation);
|
paintTransformedImage(_owner->videoFrame(), rect, rotation);
|
||||||
paintControlsFade(rect, geometry.controlsOpacity);
|
paintControlsFade(rect, geometry.controlsOpacity, geometry.fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWidget::RendererSW::paintTransformedStaticContent(
|
void OverlayWidget::RendererSW::paintTransformedStaticContent(
|
||||||
|
@ -97,12 +97,19 @@ void OverlayWidget::RendererSW::paintTransformedStaticContent(
|
||||||
if (!image.isNull()) {
|
if (!image.isNull()) {
|
||||||
paintTransformedImage(image, rect, rotation);
|
paintTransformedImage(image, rect, rotation);
|
||||||
}
|
}
|
||||||
paintControlsFade(rect, geometry.controlsOpacity);
|
paintControlsFade(rect, geometry.controlsOpacity, geometry.fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWidget::RendererSW::paintControlsFade(
|
void OverlayWidget::RendererSW::paintControlsFade(
|
||||||
QRect geometry,
|
QRect geometry,
|
||||||
float64 opacity) {
|
float64 opacity,
|
||||||
|
float64 fullFade) {
|
||||||
|
if (fullFade > 0.) {
|
||||||
|
_p->setOpacity(fullFade);
|
||||||
|
_p->fillRect(geometry, Qt::black);
|
||||||
|
opacity *= 1. - fullFade;
|
||||||
|
}
|
||||||
|
|
||||||
_p->setOpacity(opacity);
|
_p->setOpacity(opacity);
|
||||||
_p->setClipRect(geometry);
|
_p->setClipRect(geometry);
|
||||||
const auto width = _owner->width();
|
const auto width = _owner->width();
|
||||||
|
|
|
@ -33,7 +33,10 @@ private:
|
||||||
const QImage &image,
|
const QImage &image,
|
||||||
QRect rect,
|
QRect rect,
|
||||||
int rotation);
|
int rotation);
|
||||||
void paintControlsFade(QRect geometry, float64 opacity);
|
void paintControlsFade(
|
||||||
|
QRect geometry,
|
||||||
|
float64 opacity,
|
||||||
|
float64 fullFade);
|
||||||
void paintRadialLoading(
|
void paintRadialLoading(
|
||||||
QRect inner,
|
QRect inner,
|
||||||
bool radial,
|
bool radial,
|
||||||
|
|
|
@ -4011,10 +4011,12 @@ void OverlayWidget::storiesTogglePaused(bool paused) {
|
||||||
|| !_streamed->instance.player().active()) {
|
|| !_streamed->instance.player().active()) {
|
||||||
return;
|
return;
|
||||||
} else if (_streamed->instance.player().paused()) {
|
} else if (_streamed->instance.player().paused()) {
|
||||||
|
if (!paused) {
|
||||||
_streamed->instance.resume();
|
_streamed->instance.resume();
|
||||||
updatePlaybackState();
|
updatePlaybackState();
|
||||||
playbackPauseMusic();
|
playbackPauseMusic();
|
||||||
} else {
|
}
|
||||||
|
} else if (paused) {
|
||||||
_streamed->instance.pause();
|
_streamed->instance.pause();
|
||||||
updatePlaybackState();
|
updatePlaybackState();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue