Allow querying current SeparatePanel::inner widget.
This commit is contained in:
parent
7fef09421c
commit
30c5dfe6f6
2 changed files with 8 additions and 0 deletions
|
|
@ -583,10 +583,17 @@ void SeparatePanel::destroyLayer() {
|
||||||
layer = nullptr;
|
layer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RpWidget *SeparatePanel::inner() const {
|
||||||
|
return _inner.get();
|
||||||
|
}
|
||||||
|
|
||||||
void SeparatePanel::showInner(base::unique_qptr<RpWidget> inner) {
|
void SeparatePanel::showInner(base::unique_qptr<RpWidget> inner) {
|
||||||
Expects(!size().isEmpty());
|
Expects(!size().isEmpty());
|
||||||
|
|
||||||
|
auto old = base::take(_inner);
|
||||||
_inner = std::move(inner);
|
_inner = std::move(inner);
|
||||||
|
old = nullptr; // Make sure in old destructor inner() != old.
|
||||||
|
|
||||||
_inner->setParent(_body);
|
_inner->setParent(_body);
|
||||||
_inner->move(0, 0);
|
_inner->move(0, 0);
|
||||||
_body->sizeValue(
|
_body->sizeValue(
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ public:
|
||||||
void showAndActivate();
|
void showAndActivate();
|
||||||
int hideGetDuration();
|
int hideGetDuration();
|
||||||
|
|
||||||
|
[[nodiscard]] RpWidget *inner() const;
|
||||||
void showInner(base::unique_qptr<RpWidget> inner);
|
void showInner(base::unique_qptr<RpWidget> inner);
|
||||||
void showBox(
|
void showBox(
|
||||||
object_ptr<BoxContent> box,
|
object_ptr<BoxContent> box,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue