mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-23 01:27:15 +02:00
Moved all files related to menu to separate namespace.
This commit is contained in:
parent
03a7131a1a
commit
97e8c0956f
2 changed files with 9 additions and 6 deletions
|
@ -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<Ui::PlainShadow>(_inner.get()))))
|
||||
, _menu(_inner->add(
|
||||
object_ptr<Ui::Menu>(_inner.get(), st::mainMenu),
|
||||
object_ptr<Ui::Menu::Menu>(_inner.get(), st::mainMenu),
|
||||
{ 0, st::mainMenuSkip, 0, 0 }))
|
||||
, _footer(_inner->add(object_ptr<Ui::RpWidget>(_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();
|
||||
|
|
|
@ -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 <typename Widget>
|
||||
class SlideWrap;
|
||||
namespace Menu {
|
||||
class Menu;
|
||||
} // namespace Menu
|
||||
} // namespace Ui
|
||||
|
||||
namespace Main {
|
||||
|
@ -84,7 +86,7 @@ private:
|
|||
not_null<Ui::SlideWrap<Ui::VerticalLayout>*> _accounts;
|
||||
Ui::SlideWrap<Ui::RippleButton> *_addAccount = nullptr;
|
||||
not_null<Ui::SlideWrap<Ui::PlainShadow>*> _shadow;
|
||||
not_null<Ui::Menu*> _menu;
|
||||
not_null<Ui::Menu::Menu*> _menu;
|
||||
not_null<Ui::RpWidget*> _footer;
|
||||
not_null<Ui::FlatLabel*> _telegram;
|
||||
not_null<Ui::FlatLabel*> _version;
|
||||
|
|
Loading…
Add table
Reference in a new issue