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