mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Mirror outgoing video horizontally.
This commit is contained in:
parent
e01bf8e1cd
commit
97fe05c7ed
1 changed files with 6 additions and 2 deletions
|
@ -118,10 +118,13 @@ void VideoBubble::paint() {
|
|||
const auto padding = st::boxRoundShadow.extend;
|
||||
const auto inner = _content.rect().marginsRemoved(padding);
|
||||
Ui::Shadow::paint(p, inner, _content.width(), st::boxRoundShadow);
|
||||
const auto factor = cIntRetinaFactor();
|
||||
p.drawImage(
|
||||
inner,
|
||||
_frame,
|
||||
QRect(QPoint(), inner.size() * cIntRetinaFactor()));
|
||||
QRect(
|
||||
QPoint(_frame.width() - (inner.width() * factor), 0),
|
||||
inner.size() * factor));
|
||||
}
|
||||
_track->markFrameShown();
|
||||
}
|
||||
|
@ -144,7 +147,7 @@ void VideoBubble::prepareFrame() {
|
|||
const auto frame = _track->frame(request);
|
||||
if (_frame.width() < size.width() || _frame.height() < size.height()) {
|
||||
_frame = QImage(
|
||||
_max * cIntRetinaFactor(),
|
||||
size * cIntRetinaFactor(),
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
}
|
||||
Assert(_frame.width() >= frame.width()
|
||||
|
@ -163,6 +166,7 @@ void VideoBubble::prepareFrame() {
|
|||
ImageRoundRadius::Large,
|
||||
RectPart::AllCorners,
|
||||
QRect(QPoint(), size));
|
||||
_frame = std::move(_frame).mirrored(true, false);
|
||||
}
|
||||
|
||||
void VideoBubble::setState(Webrtc::VideoState state) {
|
||||
|
|
Loading…
Add table
Reference in a new issue