Toggle fullscreen by double click in media viewe title area

This commit is contained in:
Ilya Fedin 2024-10-10 09:20:15 +04:00 committed by John Preston
parent b0ecb2c535
commit 88703ba1eb

View file

@ -808,7 +808,7 @@ void OverlayWidget::setupWindow() {
return result; return result;
} }
if (widgetPoint.y() <= st::mediaviewTitleButton.height) { if (widgetPoint.y() <= st::mediaviewTitleButton.height) {
result |= Flag::Menu; result |= Flag::Menu | Flag::FullScreen;
} }
const auto inControls = ((_over != Over::None) && (_over != Over::Video)); const auto inControls = ((_over != Over::None) && (_over != Over::Video));
if (inControls if (inControls
@ -6046,6 +6046,7 @@ void OverlayWidget::handleMouseRelease(
_dragging = 0; _dragging = 0;
setCursor(style::cur_default); setCursor(style::cur_default);
} else if (!_windowed } else if (!_windowed
&& position.y() > st::mediaviewTitleButton.height
&& (position - _lastAction).manhattanLength() && (position - _lastAction).manhattanLength()
>= st::mediaviewDeltaFromLastAction) { >= st::mediaviewDeltaFromLastAction) {
if (_themePreviewShown) { if (_themePreviewShown) {