mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Use media viewer size hack only when required.
This commit is contained in:
parent
47e32bebe4
commit
348666de6d
1 changed files with 10 additions and 2 deletions
|
@ -508,8 +508,16 @@ void OverlayWidget::updateGeometry() {
|
|||
? window()->screen()
|
||||
: QApplication::primaryScreen();
|
||||
const auto available = screen->geometry();
|
||||
const auto useSizeHack = _opengl && Platform::IsWindows();
|
||||
const auto use = available.marginsAdded({ 0, 0, 0, 1 });
|
||||
const auto openglWidget = _opengl
|
||||
? static_cast<QOpenGLWidget*>(_widget.get())
|
||||
: nullptr;
|
||||
const auto useSizeHack = Platform::IsWindows()
|
||||
&& openglWidget
|
||||
&& (openglWidget->format().renderableType()
|
||||
!= QSurfaceFormat::OpenGLES);
|
||||
const auto use = useSizeHack
|
||||
? available.marginsAdded({ 0, 0, 0, 1 })
|
||||
: available;
|
||||
const auto mask = useSizeHack
|
||||
? QRegion(QRect(QPoint(), available.size()))
|
||||
: QRegion();
|
||||
|
|
Loading…
Add table
Reference in a new issue