2
0
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:
John Preston
2019-09-18 14:19:05 +03:00
parent 860353824b
commit a6c84c36c0
209 changed files with 586 additions and 3349 deletions

View File

@@ -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()) {