diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index beaf2319e..6f8fb9573 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -869,7 +869,11 @@ void TopBarWidget::updateControlsGeometry() { _cancelChoose->moveToLeft(_leftTaken, otherButtonsTop); _leftTaken += _cancelChoose->width(); } else if (_back->isHidden()) { - _leftTaken = st::topBarArrowPadding.right(); + if (::Kotato::JsonSettings::GetBool("always_show_top_userpic")) { + _leftTaken = st::topBarActionSkip; + } else { + _leftTaken = st::topBarArrowPadding.right(); + } } else { const auto smallDialogsColumn = _activeChat.key.folder() && (width() < _back->width() + _search->width()); @@ -877,9 +881,12 @@ void TopBarWidget::updateControlsGeometry() { _back->moveToLeft(_leftTaken, otherButtonsTop); _leftTaken += _back->width(); } - if (_info && !_info->isHidden()) { - _info->moveToLeft(_leftTaken, otherButtonsTop); - _leftTaken += _info->width(); + + if (!_back->isHidden() || ::Kotato::JsonSettings::GetBool("always_show_top_userpic")) { + if (_info && !_info->isHidden()) { + _info->moveToLeft(_leftTaken, otherButtonsTop); + _leftTaken += _info->width(); + } } _rightTaken = 0; @@ -938,8 +945,8 @@ void TopBarWidget::updateControlsVisibility() { _back->setVisible(backVisible && !_chooseForReportReason); _cancelChoose->setVisible(_chooseForReportReason.has_value()); if (_info) { - _info->setVisible((isOneColumn || !_primaryWindow) - && !_chooseForReportReason); + _info->setVisible(::Kotato::JsonSettings::GetBool("always_show_top_userpic") + || ((isOneColumn || !_primaryWindow) && !_chooseForReportReason)); } if (_unreadBadge) { _unreadBadge->setVisible(!_chooseForReportReason); diff --git a/Telegram/SourceFiles/kotato/kotato_settings.cpp b/Telegram/SourceFiles/kotato/kotato_settings.cpp index becff9495..5ebf9426e 100644 --- a/Telegram/SourceFiles/kotato/kotato_settings.cpp +++ b/Telegram/SourceFiles/kotato/kotato_settings.cpp @@ -367,6 +367,9 @@ const std::map> DefinitionMap { .type = SettingType::IntSetting, .defaultValue = 3, .limitHandler = IntLimit(0, 3, 3), }}, + { "always_show_top_userpic", { + .type = SettingType::BoolSetting, + .defaultValue = false, }}, }; using OldOptionKey = QString;