mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix media viewer controls geometry updating.
This commit is contained in:
parent
0bdb38753b
commit
613bf98283
2 changed files with 6 additions and 0 deletions
|
@ -360,6 +360,7 @@ OverlayWidget::OverlayWidget()
|
|||
setWindowFlags(Qt::FramelessWindowHint);
|
||||
}
|
||||
updateGeometry();
|
||||
updateControlsGeometry();
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setMouseTracking(true);
|
||||
|
@ -467,6 +468,10 @@ void OverlayWidget::updateGeometry() {
|
|||
}
|
||||
|
||||
void OverlayWidget::resizeEvent(QResizeEvent *e) {
|
||||
updateControlsGeometry();
|
||||
}
|
||||
|
||||
void OverlayWidget::updateControlsGeometry() {
|
||||
auto navSkip = 2 * st::mediaviewControlMargin + st::mediaviewControlSize;
|
||||
_closeNav = myrtlrect(width() - st::mediaviewControlMargin - st::mediaviewControlSize, st::mediaviewControlMargin, st::mediaviewControlSize, st::mediaviewControlSize);
|
||||
_closeNavIcon = style::centerrect(_closeNav, st::mediaviewClose);
|
||||
|
|
|
@ -275,6 +275,7 @@ private:
|
|||
void updateDocSize();
|
||||
void updateControls();
|
||||
void updateActions();
|
||||
void updateControlsGeometry();
|
||||
void resizeCenteredControls();
|
||||
void resizeContentByScreenSize();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue