Add onShowFinished callback to BoxContent.
This commit is contained in:
parent
5c6ddf9cb3
commit
7fd90cb38b
3 changed files with 15 additions and 0 deletions
|
|
@ -126,6 +126,8 @@ public:
|
||||||
|
|
||||||
void scrollToWidget(not_null<QWidget*> widget);
|
void scrollToWidget(not_null<QWidget*> widget);
|
||||||
|
|
||||||
|
virtual void showFinished() {
|
||||||
|
}
|
||||||
void clearButtons() {
|
void clearButtons() {
|
||||||
getDelegate()->clearButtons();
|
getDelegate()->clearButtons();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,10 @@ public:
|
||||||
LayerOptions options,
|
LayerOptions options,
|
||||||
anim::type animated) override;
|
anim::type animated) override;
|
||||||
|
|
||||||
|
void showFinished() override {
|
||||||
|
_content->showFinished();
|
||||||
|
}
|
||||||
|
|
||||||
void clearButtons() override;
|
void clearButtons() override;
|
||||||
QPointer<RoundButton> addButton(
|
QPointer<RoundButton> addButton(
|
||||||
rpl::producer<QString> text,
|
rpl::producer<QString> text,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ public:
|
||||||
void setFocusCallback(Fn<void()> callback) {
|
void setFocusCallback(Fn<void()> callback) {
|
||||||
_focus = callback;
|
_focus = callback;
|
||||||
}
|
}
|
||||||
|
void setShowFinishedCallback(Fn<void()> callback) {
|
||||||
|
_showFinished = callback;
|
||||||
|
}
|
||||||
|
|
||||||
int rowsCount() const {
|
int rowsCount() const {
|
||||||
return _content->count();
|
return _content->count();
|
||||||
|
|
@ -76,6 +79,11 @@ public:
|
||||||
BoxContent::setInnerFocus();
|
BoxContent::setInnerFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void showFinished() override {
|
||||||
|
if (_showFinished) {
|
||||||
|
_showFinished();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[[nodiscard]] not_null<Ui::VerticalLayout*> verticalLayout();
|
[[nodiscard]] not_null<Ui::VerticalLayout*> verticalLayout();
|
||||||
|
|
||||||
|
|
@ -111,6 +119,7 @@ private:
|
||||||
|
|
||||||
FnMut<void(not_null<GenericBox*>)> _init;
|
FnMut<void(not_null<GenericBox*>)> _init;
|
||||||
Fn<void()> _focus;
|
Fn<void()> _focus;
|
||||||
|
Fn<void()> _showFinished;
|
||||||
object_ptr<Ui::VerticalLayout> _content;
|
object_ptr<Ui::VerticalLayout> _content;
|
||||||
int _width = 0;
|
int _width = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue