File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -285,11 +285,12 @@ bool CScrollRegion::Active() const
285285 return Ui ()->ActiveItem () == &m_ScrollY;
286286}
287287
288- bool CScrollRegion::AtEnd () const
288+ bool CScrollRegion::AtEnd (const CUIRect &Rect ) const
289289{
290290 if (m_ContentH <= m_ClipRect.h )
291291 return true ;
292292
293- const float MaxScroll = m_ContentH - m_ClipRect.h ;
294- return (m_ScrollY >= MaxScroll - 1 .0f );
293+ float VisibleBottom = m_ScrollY + m_ClipRect.h ;
294+ float RectBottom = Rect.y + Rect.h ;
295+ return RectBottom >= VisibleBottom - 1 .0f ;
295296}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ class CScrollRegion : private CUIElementBase
142142 bool ScrollbarShown () const ;
143143 bool Animating () const ;
144144 bool Active () const ;
145- bool AtEnd () const ;
145+ bool AtEnd (const CUIRect &Rect ) const ;
146146 const CScrollRegionParams &Params () const { return m_Params; }
147147};
148148
You can’t perform that action at this time.
0 commit comments