mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-15 09:50:47 +01: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);
|
NeedUpdate := FHSbVisible <> Ord(AVisible);
|
||||||
if NeedUpdate then
|
if NeedUpdate then
|
||||||
ScrollBarShow(SB_HORZ, aVisible);
|
ScrollBarShow(SB_HORZ, aVisible);
|
||||||
|
{$if NOT defined(DARWIN)} // on Cocoa, Overly Style ScrollBar always needs the latest data
|
||||||
if aVisible or NeedUpdate then
|
if aVisible or NeedUpdate then
|
||||||
|
{$endif}
|
||||||
ScrollBarRange(SB_HORZ, aRange, aPage, aPos);
|
ScrollBarRange(SB_HORZ, aRange, aPage, aPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8162,7 +8164,9 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
if FVSbVisible<>Ord(aVisible) then
|
if FVSbVisible<>Ord(aVisible) then
|
||||||
ScrollBarShow(SB_VERT, aVisible);
|
ScrollBarShow(SB_VERT, aVisible);
|
||||||
|
{$if NOT defined(DARWIN)} // on Cocoa, Overly Style ScrollBar always needs the latest data
|
||||||
if aVisible then
|
if aVisible then
|
||||||
|
{$endif}
|
||||||
ScrollbarRange(SB_VERT, aRange, aPage, aPos );
|
ScrollbarRange(SB_VERT, aRange, aPage, aPos );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user