diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 1f35557d86..0b69768339 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1848,7 +1848,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_group_call_invite_done_user" = "You invited {user} to the voice chat."; "lng_group_call_invite_done_many#one" = "You invited **{count} member** to the voice chat."; "lng_group_call_invite_done_many#other" = "You invited **{count} members** to the voice chat."; -"lng_group_call_no_members" = "No members"; +"lng_group_call_no_members" = "click to join"; "lng_group_call_members#one" = "{count} member"; "lng_group_call_members#other" = "{count} members"; "lng_group_call_no_anonymous" = "Sorry, anonymous group admins can't join voice chats."; diff --git a/Telegram/SourceFiles/calls/calls.style b/Telegram/SourceFiles/calls/calls.style index 0677bb9c6e..45ed1b11af 100644 --- a/Telegram/SourceFiles/calls/calls.style +++ b/Telegram/SourceFiles/calls/calls.style @@ -591,9 +591,9 @@ groupCallTopBarUserpicSize: 28px; groupCallTopBarUserpicShift: 8px; groupCallTopBarUserpicStroke: 2px; groupCallTopBarJoin: RoundButton(defaultActiveButton) { - width: -30px; - height: 28px; - textTop: 5px; + width: -26px; + height: 26px; + textTop: 4px; } groupCallBox: Box(defaultBox) { button: RoundButton(defaultBoxButton) { diff --git a/Telegram/SourceFiles/core/core_settings.cpp b/Telegram/SourceFiles/core/core_settings.cpp index 332b20c590..cecd332f0c 100644 --- a/Telegram/SourceFiles/core/core_settings.cpp +++ b/Telegram/SourceFiles/core/core_settings.cpp @@ -275,8 +275,7 @@ void Settings::addFromSerialized(const QByteArray &serialized) { >> groupCallPushToTalkShortcut >> groupCallPushToTalkDelay; } - if (false && stream.status() != QDataStream::Ok) { - AssertIsDebug(); + if (stream.status() != QDataStream::Ok) { LOG(("App Error: " "Bad data for Core::Settings::constructFromSerialized()")); return; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index aa92502368..bb0ec76a05 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1262,12 +1262,12 @@ void HistoryWidget::orderWidgets() { if (_contactStatus) { _contactStatus->raise(); } - if (_groupCallBar) { - _groupCallBar->raise(); - } if (_pinnedBar) { _pinnedBar->raise(); } + if (_groupCallBar) { + _groupCallBar->raise(); + } _topShadow->raise(); if (_fieldAutocomplete) { _fieldAutocomplete->raise(); @@ -4448,17 +4448,17 @@ void HistoryWidget::updateControlsGeometry() { moveFieldControls(); - const auto pinnedBarTop = _topBar->bottomNoMargins(); - if (_pinnedBar) { - _pinnedBar->move(0, pinnedBarTop); - _pinnedBar->resizeToWidth(width()); - } - const auto groupCallTop = pinnedBarTop + (_pinnedBar ? _pinnedBar->height() : 0); + const auto groupCallTop = _topBar->bottomNoMargins(); if (_groupCallBar) { _groupCallBar->move(0, groupCallTop); _groupCallBar->resizeToWidth(width()); } - const auto contactStatusTop = groupCallTop + (_groupCallBar ? _groupCallBar->height() : 0); + const auto pinnedBarTop = groupCallTop + (_groupCallBar ? _groupCallBar->height() : 0); + if (_pinnedBar) { + _pinnedBar->move(0, pinnedBarTop); + _pinnedBar->resizeToWidth(width()); + } + const auto contactStatusTop = pinnedBarTop + (_pinnedBar ? _pinnedBar->height() : 0); if (_contactStatus) { _contactStatus->move(0, contactStatusTop); } diff --git a/Telegram/SourceFiles/ui/chat/group_call_bar.cpp b/Telegram/SourceFiles/ui/chat/group_call_bar.cpp index cff4ed1f5c..d1bb247f72 100644 --- a/Telegram/SourceFiles/ui/chat/group_call_bar.cpp +++ b/Telegram/SourceFiles/ui/chat/group_call_bar.cpp @@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lang/lang_keys.h" #include "styles/style_chat.h" #include "styles/style_calls.h" +#include "styles/style_info.h" // st::topBarArrowPadding, like TopBarWidget. #include "styles/palette.h" #include @@ -116,17 +117,7 @@ void GroupCallBar::setupInner() { void GroupCallBar::paint(Painter &p) { p.fillRect(_inner->rect(), st::historyComposeAreaBg); - auto left = st::msgReplyBarSkip; - if (!_content.userpics.isNull()) { - const auto imageSize = _content.userpics.size() - / _content.userpics.devicePixelRatio(); - // Skip shadow of the bar above. - const auto imageTop = (st::historyReplyHeight - - st::lineWidth - - imageSize.height()) / 2 + st::lineWidth; - p.drawImage(left, imageTop, _content.userpics); - left += imageSize.width() + st::msgReplyBarSkip; - } + const auto left = st::topBarArrowPadding.right(); const auto titleTop = st::msgReplyPadding.top(); const auto textTop = titleTop + st::msgServiceNameFont->height; const auto width = _inner->width(); @@ -142,6 +133,17 @@ void GroupCallBar::paint(Painter &p) { (_content.count > 0 ? tr::lng_group_call_members(tr::now, lt_count, _content.count) : tr::lng_group_call_no_members(tr::now))); + + if (!_content.userpics.isNull()) { + const auto imageSize = _content.userpics.size() + / _content.userpics.devicePixelRatio(); + // Skip shadow of the bar above. + const auto imageTop = (st::historyReplyHeight + - st::lineWidth + - imageSize.height()) / 2 + st::lineWidth; + const auto imageLeft = (_inner->width() - imageSize.width()) / 2; + p.drawImage(imageLeft, imageTop, _content.userpics); + } } void GroupCallBar::updateControlsGeometry(QRect wrapGeometry) {