mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:16:17 +02:00
Cocoa/Scroller: replace deprecated functions
This commit is contained in:
parent
9f16f34839
commit
fc3071a276
@ -569,7 +569,8 @@ begin
|
||||
else
|
||||
begin
|
||||
f := frame;
|
||||
w := NSScroller.scrollerWidth;
|
||||
w := NSScroller.scrollerWidthForControlSize_scrollerStyle(
|
||||
fhscroll.controlSize, fhscroll.preferredScrollerStyle);
|
||||
r := NSMakeRect(0, 0, Max(f.size.width,w+1), w); // width<height to create a horizontal scroller
|
||||
allocScroller( self, fhscroll, r, avisible);
|
||||
fhscroll.setAutoresizingMask(NSViewWidthSizable);
|
||||
@ -588,7 +589,8 @@ begin
|
||||
else
|
||||
begin
|
||||
f := frame;
|
||||
w := NSScroller.scrollerWidth;
|
||||
w := NSScroller.scrollerWidthForControlSize_scrollerStyle(
|
||||
fvscroll.controlSize, fvscroll.preferredScrollerStyle);
|
||||
r := NSMakeRect(0, 0, w, Max(f.size.height,w+1)); // height<width to create a vertical scroller
|
||||
allocScroller( self, fvscroll, r, avisible);
|
||||
fvscroll.setAutoresizingMask(NSViewHeightSizable or NSViewMinXMargin);
|
||||
|
@ -1548,10 +1548,10 @@ begin
|
||||
else if (BarKind = SB_Horz) and Assigned(NSScrollView(obj).horizontalScroller) then
|
||||
Result:=round(NSScrollView(obj).verticalScroller.frame.size.height)
|
||||
else
|
||||
Result := Round(NSScroller.scrollerWidth);
|
||||
Result := GetSystemMetrics(SM_CXVSCROLL);
|
||||
end
|
||||
else
|
||||
Result := Round(NSScroller.scrollerWidth);
|
||||
Result := GetSystemMetrics(SM_CXVSCROLL);
|
||||
end;
|
||||
|
||||
function TCocoaWidgetSet.GetScrollbarVisible(Handle: HWND; SBStyle: Integer): boolean;
|
||||
@ -2601,7 +2601,7 @@ begin
|
||||
SM_CYHSCROLL,
|
||||
SM_CXVSCROLL,
|
||||
SM_CYVSCROLL:
|
||||
Result := Round(NSScroller.scrollerWidthForControlSize(NSRegularControlSize));
|
||||
Result := Round(NSScroller.scrollerWidthForControlSize_scrollerStyle(NSRegularControlSize, NSScrollerStyleLegacy));
|
||||
SM_CXSCREEN,
|
||||
SM_CXFULLSCREEN:
|
||||
Result := Round(NSPrimaryScreenFrame.size.width);
|
||||
@ -2631,7 +2631,7 @@ begin
|
||||
end;
|
||||
SM_CXDRAG,SM_CYDRAG: Result := 5;
|
||||
SM_CXHTHUMB, SM_CYVTHUMB:
|
||||
Result := Round(NSScroller.scrollerWidthForControlSize(NSRegularControlSize));
|
||||
Result := Round(NSScroller.scrollerWidthForControlSize_scrollerStyle(NSRegularControlSize, NSScrollerStyleLegacy));
|
||||
SM_SWSCROLLBARSPACING:
|
||||
Result := 0;
|
||||
SM_LCLHasFormAlphaBlend:
|
||||
|
Loading…
Reference in New Issue
Block a user