mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Allow layers with fixed-bottom to stick-to-bottom.
This commit is contained in:
@@ -280,7 +280,6 @@ QRect LayerWidget::countGeometry(int newWidth) {
|
||||
st::infoLayerTopMaximal);
|
||||
const auto newBottom = newTop;
|
||||
|
||||
const auto hasCustomBottomBar = _content->hasCustomBottomBar();
|
||||
const auto bottomRadius = st::boxRadius;
|
||||
// Top rounding is included in _contentHeight.
|
||||
auto desiredHeight = _contentHeight + bottomRadius;
|
||||
@@ -293,9 +292,7 @@ QRect LayerWidget::countGeometry(int newWidth) {
|
||||
const auto contentWidth = newWidth;
|
||||
auto contentHeight = desiredHeight - contentTop - contentBottom;
|
||||
const auto scrollTillBottom = _content->scrollTillBottom(contentHeight);
|
||||
auto additionalScroll = hasCustomBottomBar
|
||||
? 0
|
||||
: std::min(scrollTillBottom, newBottom);
|
||||
auto additionalScroll = std::min(scrollTillBottom, newBottom);
|
||||
|
||||
const auto expanding = (_desiredHeight > _contentHeight);
|
||||
|
||||
|
@@ -816,10 +816,6 @@ QPixmap WrapWidget::grabForShowAnimation(
|
||||
return result;
|
||||
}
|
||||
|
||||
bool WrapWidget::hasCustomBottomBar() const {
|
||||
return _content->scrollBottomSkip() > 0;
|
||||
}
|
||||
|
||||
void WrapWidget::showAnimatedHook(
|
||||
const Window::SectionSlideParams ¶ms) {
|
||||
//if (params.withTabs && _topTabs) {
|
||||
|
@@ -100,8 +100,6 @@ public:
|
||||
QPixmap grabForShowAnimation(
|
||||
const Window::SectionSlideParams ¶ms) override;
|
||||
|
||||
[[nodiscard]] bool hasCustomBottomBar() const;
|
||||
|
||||
void forceContentRepaint();
|
||||
|
||||
bool showInternal(
|
||||
|
Reference in New Issue
Block a user