[Visual] Allow hiding shadow of modal window header
This was needed for custom changelog box, which is currently not in main branch.
This commit is contained in:
parent
26805a32b8
commit
13a177293c
2 changed files with 12 additions and 1 deletions
|
|
@ -330,10 +330,12 @@ void BoxContent::updateShadowsVisibility(anim::type animated) {
|
||||||
_topShadow->toggle(
|
_topShadow->toggle(
|
||||||
((top > 0)
|
((top > 0)
|
||||||
|| (_innerTopSkip > 0
|
|| (_innerTopSkip > 0
|
||||||
|
&& !_topShadowWithSkip
|
||||||
&& !getDelegate()->style().shadowIgnoreTopSkip)),
|
&& !getDelegate()->style().shadowIgnoreTopSkip)),
|
||||||
animated);
|
animated);
|
||||||
_bottomShadow->toggle(
|
_bottomShadow->toggle(
|
||||||
(top < _scroll->scrollTopMax() || _innerBottomSkip > 0),
|
(top < _scroll->scrollTopMax()
|
||||||
|
|| (_innerBottomSkip > 0 && !_bottomShadowWithSkip)),
|
||||||
animated);
|
animated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,13 @@ protected:
|
||||||
getDelegate()->setLayerType(layerType);
|
getDelegate()->setLayerType(layerType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setTopShadowWithSkip(bool enabled) {
|
||||||
|
_topShadowWithSkip = enabled;
|
||||||
|
}
|
||||||
|
void setBottomShadowWithSkip(bool enabled) {
|
||||||
|
_bottomShadowWithSkip = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
void setDimensions(
|
void setDimensions(
|
||||||
int newWidth,
|
int newWidth,
|
||||||
int maxHeight,
|
int maxHeight,
|
||||||
|
|
@ -302,6 +309,8 @@ private:
|
||||||
bool _preparing = false;
|
bool _preparing = false;
|
||||||
bool _noContentMargin = false;
|
bool _noContentMargin = false;
|
||||||
bool _closeByEscape = true;
|
bool _closeByEscape = true;
|
||||||
|
bool _topShadowWithSkip = false;
|
||||||
|
bool _bottomShadowWithSkip = false;
|
||||||
int _innerTopSkip = 0;
|
int _innerTopSkip = 0;
|
||||||
int _innerBottomSkip = 0;
|
int _innerBottomSkip = 0;
|
||||||
object_ptr<ScrollArea> _scroll = { nullptr };
|
object_ptr<ScrollArea> _scroll = { nullptr };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue