diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index 2213c1b84..0c36684e6 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -12,7 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_session_controller.h" #include "ui/widgets/buttons.h" #include "ui/widgets/labels.h" -#include "ui/widgets/menu.h" +#include "ui/widgets/menu/menu.h" +#include "ui/widgets/menu/menu_common.h" #include "ui/widgets/popup_menu.h" #include "ui/widgets/scroll_area.h" #include "ui/widgets/shadow.h" @@ -524,7 +525,7 @@ MainMenu::MainMenu( _inner.get(), object_ptr(_inner.get())))) , _menu(_inner->add( - object_ptr(_inner.get(), st::mainMenu), + object_ptr(_inner.get(), st::mainMenu), { 0, st::mainMenuSkip, 0, 0 })) , _footer(_inner->add(object_ptr(_inner.get()))) , _telegram( @@ -565,8 +566,8 @@ MainMenu::MainMenu( }, _inner->lifetime()); parentResized(); - _menu->setTriggeredCallback([](QAction *action, int actionTop, Ui::Menu::TriggeredSource source) { - emit action->triggered(); + _menu->setTriggeredCallback([](const Ui::Menu::CallbackData &data) { + emit data.action->triggered(); }); refreshMenu(); refreshBackground(); diff --git a/Telegram/SourceFiles/window/window_main_menu.h b/Telegram/SourceFiles/window/window_main_menu.h index af8df5bbd..4866d6192 100644 --- a/Telegram/SourceFiles/window/window_main_menu.h +++ b/Telegram/SourceFiles/window/window_main_menu.h @@ -16,7 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Ui { class IconButton; class FlatLabel; -class Menu; class UserpicButton; class PopupMenu; class ScrollArea; @@ -25,6 +24,9 @@ class RippleButton; class PlainShadow; template class SlideWrap; +namespace Menu { +class Menu; +} // namespace Menu } // namespace Ui namespace Main { @@ -84,7 +86,7 @@ private: not_null*> _accounts; Ui::SlideWrap *_addAccount = nullptr; not_null*> _shadow; - not_null _menu; + not_null _menu; not_null _footer; not_null _telegram; not_null _version;