2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Allow layers with fixed-bottom to stick-to-bottom.

This commit is contained in:
John Preston
2022-05-23 15:45:43 +04:00
parent ff030d0252
commit 62f42eabb0
4 changed files with 2 additions and 21 deletions

View File

@@ -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);