mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fix media viewer crop on multi-monitor setup.
This commit is contained in:
parent
e99e35a12a
commit
261740967d
1 changed files with 4 additions and 4 deletions
|
@ -516,8 +516,8 @@ void OverlayWidget::updateGeometry(bool inMove) {
|
|||
const auto openglWidget = _opengl
|
||||
? static_cast<QOpenGLWidget*>(_widget.get())
|
||||
: nullptr;
|
||||
const auto useSizeHack = Platform::IsWindows()
|
||||
&& openglWidget
|
||||
const auto possibleSizeHack = Platform::IsWindows() && openglWidget;
|
||||
const auto useSizeHack = possibleSizeHack
|
||||
&& (openglWidget->format().renderableType()
|
||||
!= QSurfaceFormat::OpenGLES);
|
||||
const auto use = useSizeHack
|
||||
|
@ -530,7 +530,7 @@ void OverlayWidget::updateGeometry(bool inMove) {
|
|||
return;
|
||||
}
|
||||
if ((_widget->geometry() == use)
|
||||
&& (!useSizeHack || _widget->mask() == mask)) {
|
||||
&& (!possibleSizeHack || _widget->mask() == mask)) {
|
||||
return;
|
||||
}
|
||||
DEBUG_LOG(("Viewer Pos: Setting %1, %2, %3, %4")
|
||||
|
@ -541,7 +541,7 @@ void OverlayWidget::updateGeometry(bool inMove) {
|
|||
_widget->setGeometry(use);
|
||||
_widget->setMinimumSize(use.size());
|
||||
_widget->setMaximumSize(use.size());
|
||||
if (useSizeHack) {
|
||||
if (possibleSizeHack) {
|
||||
_widget->setMask(mask);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue