mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 07:59:35 +02:00
Grids: fix the issue that Grids don't update data to Cocoa when the ScrollBar is hidden on macOS
on macOS, there are two styles: Legacy and Overlay. whether the ScrollBar data is synchronized can't be determined by whether it is visible.
This commit is contained in:
parent
05e119e924
commit
9c955b7cf7
@ -8149,7 +8149,9 @@ begin
|
||||
NeedUpdate := FHSbVisible <> Ord(AVisible);
|
||||
if NeedUpdate then
|
||||
ScrollBarShow(SB_HORZ, aVisible);
|
||||
{$if NOT defined(DARWIN)} // on Cocoa, Overly Style ScrollBar always needs the latest data
|
||||
if aVisible or NeedUpdate then
|
||||
{$endif}
|
||||
ScrollBarRange(SB_HORZ, aRange, aPage, aPos);
|
||||
end;
|
||||
|
||||
@ -8162,7 +8164,9 @@ begin
|
||||
{$endif}
|
||||
if FVSbVisible<>Ord(aVisible) then
|
||||
ScrollBarShow(SB_VERT, aVisible);
|
||||
{$if NOT defined(DARWIN)} // on Cocoa, Overly Style ScrollBar always needs the latest data
|
||||
if aVisible then
|
||||
{$endif}
|
||||
ScrollbarRange(SB_VERT, aRange, aPage, aPos );
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user