mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix media viewer controls geometry updating.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user