From 7aa12b6e07c66684aec43c4b7be999276ac4cabb Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 17 Dec 2020 15:59:41 +0400 Subject: [PATCH] Improve macOS voice chat window title. --- Telegram/SourceFiles/calls/calls_group_panel.cpp | 10 +++++----- Telegram/lib_ui | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_group_panel.cpp b/Telegram/SourceFiles/calls/calls_group_panel.cpp index 34803e7cd..3a148d70d 100644 --- a/Telegram/SourceFiles/calls/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/calls_group_panel.cpp @@ -220,8 +220,6 @@ GroupPanel::GroupPanel(not_null call) _layerBg->setStyleOverrides(&st::groupCallBox, &st::groupCallLayerBox); _settings->setColorOverrides(_mute->colorOverrides()); - _window->setTitleStyle(st::groupCallTitle); - SubscribeToMigration( _peer, _window->lifetime(), @@ -276,7 +274,7 @@ void GroupPanel::initWindow() { _window->setAttribute(Qt::WA_NoSystemBackground); _window->setWindowIcon( QIcon(QPixmap::fromImage(Image::Empty()->original(), Qt::ColorOnly))); - _window->setTitleStyle(st::callTitle); + _window->setTitleStyle(st::groupCallTitle); subscribeToPeerChanges(); @@ -589,7 +587,7 @@ std::optional GroupPanel::computeTitleRect() const { #ifdef Q_OS_WIN const auto controls = _controls->geometry(); return QRect(0, 0, controls.x(), controls.height()); -#elif Q_OS_MAC // Q_OS_WIN +#elif defined Q_OS_MAC // Q_OS_WIN return QRect(70, 0, widget()->width() - 70, 28); #else // Q_OS_WIN || Q_OS_MAC return std::nullopt; @@ -678,7 +676,9 @@ void GroupPanel::refreshTitle() { const auto top = _title ? st::groupCallSubtitleTop : st::groupCallTitleTop; - _subtitle->moveToLeft(middle - (_subtitle->width() / 2), top); + _subtitle->moveToLeft( + (widget()->width() - _subtitle->width()) / 2, + top); } void GroupPanel::paint(QRect clip) { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 3bd98ac56..5e3897fcf 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 3bd98ac5640523d2ccd241c2c0af49aba9494066 +Subproject commit 5e3897fcff29c65c72fdf8f7f282aee0f6bed644