Add access to scrollTop[Value] of PopupMenu.

This commit is contained in:
John Preston 2023-06-01 19:51:28 +04:00
parent 57143bfae1
commit 83cab52cd6
2 changed files with 11 additions and 0 deletions

View file

@ -942,6 +942,14 @@ bool PopupMenu::useTransparency() const {
return _useTransparency; return _useTransparency;
} }
int PopupMenu::scrollTop() const {
return _scroll->scrollTop();
}
rpl::producer<int> PopupMenu::scrollTopValue() const {
return _scroll->scrollTopValue();
}
rpl::producer<PopupMenu::ShowState> PopupMenu::showStateValue() const { rpl::producer<PopupMenu::ShowState> PopupMenu::showStateValue() const {
return _showStateChanges.events(); return _showStateChanges.events();
} }

View file

@ -93,6 +93,9 @@ public:
[[nodiscard]] QMargins preparedExtents() const; [[nodiscard]] QMargins preparedExtents() const;
[[nodiscard]] bool useTransparency() const; [[nodiscard]] bool useTransparency() const;
[[nodiscard]] int scrollTop() const;
[[nodiscard]] rpl::producer<int> scrollTopValue() const;
void setDestroyedCallback(Fn<void()> callback) { void setDestroyedCallback(Fn<void()> callback) {
_destroyedCallback = std::move(callback); _destroyedCallback = std::move(callback);
} }