mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Added method to Window::Controller to show custom layer widget.
This commit is contained in:
parent
d1b6cf1fae
commit
cc4055a5e3
3 changed files with 12 additions and 1 deletions
|
@ -277,6 +277,13 @@ void Controller::showToast(const QString &text) {
|
||||||
Ui::Toast::Show(_widget.bodyWidget(), text);
|
Ui::Toast::Show(_widget.bodyWidget(), text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Controller::showLayer(
|
||||||
|
std::unique_ptr<Ui::LayerWidget> &&layer,
|
||||||
|
Ui::LayerOptions options,
|
||||||
|
anim::type animated) {
|
||||||
|
_widget.showLayer(std::move(layer), options, animated);
|
||||||
|
}
|
||||||
|
|
||||||
void Controller::showBox(
|
void Controller::showBox(
|
||||||
object_ptr<Ui::BoxContent> content,
|
object_ptr<Ui::BoxContent> content,
|
||||||
Ui::LayerOptions options,
|
Ui::LayerOptions options,
|
||||||
|
|
|
@ -69,6 +69,10 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
void showToast(const QString &text);
|
void showToast(const QString &text);
|
||||||
|
void showLayer(
|
||||||
|
std::unique_ptr<Ui::LayerWidget> &&layer,
|
||||||
|
Ui::LayerOptions options,
|
||||||
|
anim::type animated = anim::type::normal);
|
||||||
|
|
||||||
void showRightColumn(object_ptr<TWidget> widget);
|
void showRightColumn(object_ptr<TWidget> widget);
|
||||||
void sideBarChanged();
|
void sideBarChanged();
|
||||||
|
|
|
@ -1206,7 +1206,7 @@ void SessionController::showLayer(
|
||||||
std::unique_ptr<Ui::LayerWidget> &&layer,
|
std::unique_ptr<Ui::LayerWidget> &&layer,
|
||||||
Ui::LayerOptions options,
|
Ui::LayerOptions options,
|
||||||
anim::type animated) {
|
anim::type animated) {
|
||||||
widget()->showLayer(std::move(layer), options, animated);
|
_window->showLayer(std::move(layer), options, animated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SessionController::removeLayerBlackout() {
|
void SessionController::removeLayerBlackout() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue