File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Telegram/SourceFiles/history/view Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,16 @@ namespace {
7575
7676constexpr auto kEmojiInteractionSeenDuration = 3 * crl::time (1000 );
7777
78+ class MenuToggleButton final : public Ui::IconButton {
79+ public:
80+ using IconButton::IconButton;
81+
82+ protected:
83+ void contextMenuEvent (QContextMenuEvent *e) override {
84+ Ui::AbstractButton::clicked (Qt::KeyboardModifiers (), Qt::LeftButton);
85+ }
86+ };
87+
7888[[nodiscard]] inline bool HasGroupCallMenu (not_null<PeerData*> peer) {
7989 return !peer->isUser ()
8090 && !peer->groupCall ()
@@ -125,7 +135,9 @@ TopBarWidget::TopBarWidget(
125135, _groupCall(this , st::topBarGroupCall)
126136, _search(this , st::topBarSearch)
127137, _infoToggle(this , st::topBarInfo)
128- , _menuToggle(this , st::topBarMenuToggle)
138+ , _menuToggle(
139+ object_ptr<Ui::IconButton>::fromRaw(
140+ Ui::CreateChild<MenuToggleButton>(this , st::topBarMenuToggle)))
129141, _titlePeerText(st::windowMinWidth / 3 )
130142, _onlineUpdater([=] { updateOnlineDisplay (); }) {
131143 setAttribute (Qt::WA_OpaquePaintEvent);
You can’t perform that action at this time.
0 commit comments