Cocoa: fix the visibility of Legacy Style Scroller

This commit is contained in:
rich2014 2024-07-05 21:14:17 +08:00
parent 551af85901
commit d5e286fd61

View File

@ -1738,6 +1738,9 @@ begin
Exit;
end;
if scroller.knobProportion = 1 then
Exit;
if scroller.isHidden then
begin
scroller.setHidden( false );
@ -1748,7 +1751,8 @@ end;
function TCocoaScrollStyleManagerLegacy.isAvailableScrollBar(scroller: NSScroller
): Boolean;
begin
Result:= Assigned(scroller) and NOT scroller.isHidden;
Result:= Assigned(scroller) and NOT scroller.isHidden and
(0<scroller.knobProportion) and (scroller.knobProportion<1);;
end;
procedure TCocoaScrollStyleManagerLegacy.showScrollBar(
@ -1757,6 +1761,9 @@ begin
if NOT Assigned(scroller) then
Exit;
if scroller.knobProportion = 1 then
Exit;
scroller.setHidden( False );
scroller.setAlphaValue( 1 );
scroller.setNeedsDisplay_( True );