From 85ec212220d03a70e875c145acc3eb3e203ce9a3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 27 Jul 2022 13:48:55 +0300 Subject: [PATCH] Don't scroll large message menus. --- Telegram/SourceFiles/history/history_inner_widget.cpp | 4 +++- .../SourceFiles/history/view/history_view_context_menu.cpp | 4 +++- .../SourceFiles/ui/controls/who_reacted_context_action.cpp | 4 +++- Telegram/lib_ui | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index bca0810fff..b57c9e1618 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2024,7 +2024,9 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } _menu = base::make_unique_q( this, - hasWhoReactedItem ? st::whoReadMenu : st::popupMenuWithIcons); + (hasWhoReactedItem + ? st::popupMenuExpandedSeparator + : st::popupMenuWithIcons)); const auto session = &this->session(); const auto controller = _controller; const auto groupLeaderOrSelf = [](HistoryItem *item) -> HistoryItem* { diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 2f3843fcb1..7a9d0cec95 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -952,7 +952,9 @@ base::unique_qptr FillContextMenu( auto result = base::make_unique_q( list, - hasWhoReactedItem ? st::whoReadMenu : st::popupMenuWithIcons); + (hasWhoReactedItem + ? st::popupMenuExpandedSeparator + : st::popupMenuWithIcons)); if (request.overSelection && !list->hasCopyRestrictionForSelected()) { const auto text = request.selectedItems.empty() diff --git a/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp b/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp index de24320384..8cab6552ab 100644 --- a/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp +++ b/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp @@ -287,7 +287,9 @@ void Action::populateSubmenu() { return; } - const auto submenu = _parentMenu->ensureSubmenu(action()); + const auto submenu = _parentMenu->ensureSubmenu( + action(), + st::whoReadMenu); _submenu.populate(submenu, _content); _parentMenu->checkSubmenuShow(); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 4ff70e7dff..9b0f4df007 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 4ff70e7dff9377db10b7c04c0c96d4d7e0e10da3 +Subproject commit 9b0f4df00715f4dfaac81e17148ca37df26fb301