2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Improve call / voicechat title controls on Windows 11.

This commit is contained in:
John Preston
2022-01-18 15:53:04 +03:00
parent 11f183a79f
commit 4934b026d3
5 changed files with 19 additions and 16 deletions

View File

@@ -61,8 +61,8 @@ Panel::Panel(not_null<Call*> call)
, _user(call->user())
, _layerBg(std::make_unique<Ui::LayerManager>(widget()))
#ifndef Q_OS_MAC
, _controls(std::make_unique<Ui::Platform::TitleControls>(
widget(),
, _controls(Ui::Platform::SetupSeparateTitleControls(
window(),
st::callTitle,
[=](bool maximized) { toggleFullScreen(maximized); }))
#endif // !Q_OS_MAC
@@ -144,7 +144,7 @@ void Panel::initWindow() {
return Flag::None | Flag(0);
}
#ifndef Q_OS_MAC
if (_controls->geometry().contains(widgetPoint)) {
if (_controls->controls.geometry().contains(widgetPoint)) {
return Flag::None | Flag(0);
}
#endif // !Q_OS_MAC
@@ -550,7 +550,7 @@ void Panel::initLayout() {
}, widget()->lifetime());
#ifndef Q_OS_MAC
_controls->raise();
_controls->wrap.raise();
#endif // !Q_OS_MAC
}
@@ -628,7 +628,7 @@ void Panel::updateControlsGeometry() {
}
if (_fingerprint) {
#ifndef Q_OS_MAC
const auto controlsGeometry = _controls->geometry();
const auto controlsGeometry = _controls->controls.geometry();
const auto halfWidth = widget()->width() / 2;
const auto minLeft = (controlsGeometry.center().x() < halfWidth)
? (controlsGeometry.width() + st::callFingerprintTop)