yangyxd / FMXUI

FMX跨平台基础UI库
MIT License
261 stars 96 forks source link

TTextview fixed draw on scroll introduced a bug (beta branch) #29

Open GaNacereddine opened 3 years ago

GaNacereddine commented 3 years ago

in commit c8d1815 titled "fix Draw TTextView error while scrolling", where these changes are made

-- if Assigned(FScrollV) and (FCanScrollV) then begin ++ if Assigned(FScrollV) and (FCanScrollV) and (ScrollValueV < 1) then begin

this is supposed to fix some scrolling error (I'm interested to know what it is), How ever in one of my tests this does the opposite.

my View port size is 418 and my max content size is 3257 my max offset is 2839,

the bug I'm having because of your change is whenever ScrollValueV is 1 the TTextView draws the beginning of the long text I have, but the scroll bar is at the end (2839).

if I remove the change you made, the scrolling is right, but I do not know what that change fixes.

Note: this might be related, I'm using an HTML text in English so #25 might be the source of the problem.

KngStr commented 3 years ago

This is the test demo. Run in Android, try to scroll to the end of the text, then you will found textview is shaking.

意帆.TextView滚动问题.zip