mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Improve child list closing.
This commit is contained in:
@@ -787,6 +787,7 @@ void Widget::changeOpenedSubsection(
|
||||
oldContentCache = grabForFolderSlideAnimation();
|
||||
}
|
||||
_showAnimation = nullptr;
|
||||
destroyChildListCanvas();
|
||||
change();
|
||||
refreshTopBars();
|
||||
updateControlsVisibility(true);
|
||||
@@ -807,6 +808,11 @@ void Widget::changeOpenedSubsection(
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::destroyChildListCanvas() {
|
||||
_childListShown = 0.;
|
||||
_hideChildListCanvas = nullptr;
|
||||
}
|
||||
|
||||
void Widget::changeOpenedFolder(Data::Folder *folder, anim::type animated) {
|
||||
if (_openedFolder == folder) {
|
||||
return;
|
||||
@@ -1987,8 +1993,7 @@ void Widget::openChildList(
|
||||
const auto animated = !_childList
|
||||
&& (params.animated == anim::type::normal);
|
||||
if (animated) {
|
||||
_childListShown = 0.;
|
||||
_hideChildListCanvas = nullptr;
|
||||
destroyChildListCanvas();
|
||||
slide.oldContentCache = Ui::GrabWidget(
|
||||
this,
|
||||
QRect(_narrowWidth, 0, width() - _narrowWidth, height()));
|
||||
@@ -2086,8 +2091,7 @@ void Widget::closeChildList(anim::type animated) {
|
||||
_hideChildListCanvas->update();
|
||||
});
|
||||
animation->setFinishedCallback([=] {
|
||||
_childListShown = 0.;
|
||||
_hideChildListCanvas = nullptr;
|
||||
destroyChildListCanvas();
|
||||
});
|
||||
animation->setPixmaps(oldContentCache, newContentCache);
|
||||
animation->start();
|
||||
|
Reference in New Issue
Block a user