diff --git a/ui/layers/box_content.cpp b/ui/layers/box_content.cpp index fdaa06c..9ed0e96 100644 --- a/ui/layers/box_content.cpp +++ b/ui/layers/box_content.cpp @@ -330,10 +330,12 @@ void BoxContent::updateShadowsVisibility(anim::type animated) { _topShadow->toggle( ((top > 0) || (_innerTopSkip > 0 + && !_topShadowWithSkip && !getDelegate()->style().shadowIgnoreTopSkip)), animated); _bottomShadow->toggle( - (top < _scroll->scrollTopMax() || _innerBottomSkip > 0), + (top < _scroll->scrollTopMax() + || (_innerBottomSkip > 0 && !_bottomShadowWithSkip)), animated); } diff --git a/ui/layers/box_content.h b/ui/layers/box_content.h index d528bf1..5526b41 100644 --- a/ui/layers/box_content.h +++ b/ui/layers/box_content.h @@ -235,6 +235,13 @@ protected: getDelegate()->setLayerType(layerType); } + void setTopShadowWithSkip(bool enabled) { + _topShadowWithSkip = enabled; + } + void setBottomShadowWithSkip(bool enabled) { + _bottomShadowWithSkip = enabled; + } + void setDimensions( int newWidth, int maxHeight, @@ -302,6 +309,8 @@ private: bool _preparing = false; bool _noContentMargin = false; bool _closeByEscape = true; + bool _topShadowWithSkip = false; + bool _bottomShadowWithSkip = false; int _innerTopSkip = 0; int _innerBottomSkip = 0; object_ptr _scroll = { nullptr };