mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 "window/window_session_controller.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
#include "ui/widgets/labels.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/popup_menu.h"
|
||||||
#include "ui/widgets/scroll_area.h"
|
#include "ui/widgets/scroll_area.h"
|
||||||
#include "ui/widgets/shadow.h"
|
#include "ui/widgets/shadow.h"
|
||||||
|
@ -524,7 +525,7 @@ MainMenu::MainMenu(
|
||||||
_inner.get(),
|
_inner.get(),
|
||||||
object_ptr<Ui::PlainShadow>(_inner.get()))))
|
object_ptr<Ui::PlainShadow>(_inner.get()))))
|
||||||
, _menu(_inner->add(
|
, _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 }))
|
{ 0, st::mainMenuSkip, 0, 0 }))
|
||||||
, _footer(_inner->add(object_ptr<Ui::RpWidget>(_inner.get())))
|
, _footer(_inner->add(object_ptr<Ui::RpWidget>(_inner.get())))
|
||||||
, _telegram(
|
, _telegram(
|
||||||
|
@ -565,8 +566,8 @@ MainMenu::MainMenu(
|
||||||
}, _inner->lifetime());
|
}, _inner->lifetime());
|
||||||
|
|
||||||
parentResized();
|
parentResized();
|
||||||
_menu->setTriggeredCallback([](QAction *action, int actionTop, Ui::Menu::TriggeredSource source) {
|
_menu->setTriggeredCallback([](const Ui::Menu::CallbackData &data) {
|
||||||
emit action->triggered();
|
emit data.action->triggered();
|
||||||
});
|
});
|
||||||
refreshMenu();
|
refreshMenu();
|
||||||
refreshBackground();
|
refreshBackground();
|
||||||
|
|
|
@ -16,7 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class IconButton;
|
class IconButton;
|
||||||
class FlatLabel;
|
class FlatLabel;
|
||||||
class Menu;
|
|
||||||
class UserpicButton;
|
class UserpicButton;
|
||||||
class PopupMenu;
|
class PopupMenu;
|
||||||
class ScrollArea;
|
class ScrollArea;
|
||||||
|
@ -25,6 +24,9 @@ class RippleButton;
|
||||||
class PlainShadow;
|
class PlainShadow;
|
||||||
template <typename Widget>
|
template <typename Widget>
|
||||||
class SlideWrap;
|
class SlideWrap;
|
||||||
|
namespace Menu {
|
||||||
|
class Menu;
|
||||||
|
} // namespace Menu
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
namespace Main {
|
namespace Main {
|
||||||
|
@ -84,7 +86,7 @@ private:
|
||||||
not_null<Ui::SlideWrap<Ui::VerticalLayout>*> _accounts;
|
not_null<Ui::SlideWrap<Ui::VerticalLayout>*> _accounts;
|
||||||
Ui::SlideWrap<Ui::RippleButton> *_addAccount = nullptr;
|
Ui::SlideWrap<Ui::RippleButton> *_addAccount = nullptr;
|
||||||
not_null<Ui::SlideWrap<Ui::PlainShadow>*> _shadow;
|
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::RpWidget*> _footer;
|
||||||
not_null<Ui::FlatLabel*> _telegram;
|
not_null<Ui::FlatLabel*> _telegram;
|
||||||
not_null<Ui::FlatLabel*> _version;
|
not_null<Ui::FlatLabel*> _version;
|
||||||
|
|
Loading…
Add table
Reference in a new issue