mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-19 06:26:55 +00:00
Fix animation lag in info layer wrap.
This commit is contained in:
parent
a7807420fa
commit
a05c7a815a
@ -440,6 +440,7 @@ void Widget::onScroll() {
|
||||
void Widget::showAnimatedHook(
|
||||
const Window::SectionSlideParams ¶ms) {
|
||||
_fixedBar->setAnimatingMode(true);
|
||||
if (params.withTopBarShadow) _fixedBarShadow->show();
|
||||
}
|
||||
|
||||
void Widget::showFinishedHook() {
|
||||
|
@ -66,7 +66,10 @@ WrapWidget::WrapWidget(
|
||||
, _wrap(wrap)
|
||||
, _controller(createController(window, memento->content()))
|
||||
, _topShadow(this) {
|
||||
_topShadow->toggleOn(topShadowToggledValue());
|
||||
_topShadow->toggleOn(topShadowToggledValue()
|
||||
| rpl::filter([](bool shown) {
|
||||
return true;
|
||||
}));
|
||||
_wrap.changes()
|
||||
| rpl::start_with_next([this] {
|
||||
setupTop();
|
||||
@ -452,7 +455,7 @@ QPixmap WrapWidget::grabForShowAnimation(
|
||||
if (params.withTopBarShadow) {
|
||||
_topShadow->setVisible(false);
|
||||
} else {
|
||||
_topShadow->toggle(_topShadow->toggled(), anim::type::instant);
|
||||
_topShadow->setVisible(_topShadow->toggled());
|
||||
}
|
||||
if (params.withTabs && _topTabs) {
|
||||
_topTabs->hide();
|
||||
@ -473,6 +476,9 @@ void WrapWidget::showAnimatedHook(
|
||||
_topTabs->show();
|
||||
_topTabsBackground->show();
|
||||
}
|
||||
if (params.withTopBarShadow) {
|
||||
_topShadow->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
void WrapWidget::doSetInnerFocus() {
|
||||
@ -544,7 +550,7 @@ void WrapWidget::showNewContent(
|
||||
&& newContent->hasTopBarShadow();
|
||||
animationParams.oldContentCache = grabForShowAnimation(
|
||||
animationParams);
|
||||
// animationParams.withFade = (wrap() == Wrap::Layer);
|
||||
animationParams.withFade = (wrap() == Wrap::Layer);
|
||||
}
|
||||
if (saveToStack) {
|
||||
auto item = StackItem();
|
||||
|
@ -71,10 +71,6 @@ void SlideAnimation::paintContents(Painter &p, const QRect &update) const {
|
||||
p.setOpacity(progress);
|
||||
st::slideShadow.fill(p, QRect(coordOver - st::slideShadow.width(), 0, st::slideShadow.width(), _cacheOver.height() / retina));
|
||||
}
|
||||
if (_topBarShadowEnabled) {
|
||||
p.setOpacity(1);
|
||||
p.fillRect(0, st::topBarHeight, _cacheOver.width() / retina, st::lineWidth, st::shadowFg);
|
||||
}
|
||||
}
|
||||
|
||||
void SlideAnimation::setDirection(SlideDirection direction) {
|
||||
|
Loading…
Reference in New Issue
Block a user