mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Use layers and boxes from lib_ui.
This commit is contained in:
@@ -126,7 +126,7 @@ void MainMenu::ResetScaleButton::paintEvent(QPaintEvent *e) {
|
||||
MainMenu::MainMenu(
|
||||
QWidget *parent,
|
||||
not_null<SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
: LayerWidget(parent)
|
||||
, _controller(controller)
|
||||
, _menu(this, st::mainMenu)
|
||||
, _telegram(this, st::mainMenuTelegramLabel)
|
||||
@@ -196,7 +196,7 @@ MainMenu::MainMenu(
|
||||
}
|
||||
});
|
||||
|
||||
resize(st::mainMenuWidth, parentWidget()->height());
|
||||
parentResized();
|
||||
_menu->setTriggeredCallback([](QAction *action, int actionTop, Ui::Menu::TriggeredSource source) {
|
||||
emit action->triggered();
|
||||
});
|
||||
@@ -237,6 +237,10 @@ MainMenu::MainMenu(
|
||||
initResetScaleButton();
|
||||
}
|
||||
|
||||
void MainMenu::parentResized() {
|
||||
resize(st::mainMenuWidth, parentWidget()->height());
|
||||
}
|
||||
|
||||
void MainMenu::refreshMenu() {
|
||||
_menu->clearActions();
|
||||
if (!_controller->session().supportMode()) {
|
||||
|
Reference in New Issue
Block a user