mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 17:33:18 +02:00
LCL carbon: fixed #0012250: Scrollbox range in Carbon by skalogryyz - return updated position in SetScrollInfo
git-svn-id: trunk@17171 -
This commit is contained in:
parent
78b010d112
commit
618134b3a2
@ -877,7 +877,7 @@ end;
|
||||
Method: TCarbonCustomControl.SetScrollInfo
|
||||
Params: SBStyle - Scrollbar type (SB_VERT, SB_HORZ)
|
||||
ScrollInfo - Scrolling info
|
||||
Returns: The old scroll bar position
|
||||
Returns: The new scroll bar position
|
||||
|
||||
Sets the scrolling info of the specified scroll bar
|
||||
------------------------------------------------------------------------------}
|
||||
@ -893,11 +893,6 @@ begin
|
||||
' SBStyle: ' + DbgS(SBStyle) + ' ' + DbgS(ScrollInfo));
|
||||
{$ENDIF}
|
||||
|
||||
if SBStyle = SB_HORZ then
|
||||
Result := Round(FScrollOrigin.X);
|
||||
if SBStyle = SB_VERT then
|
||||
Result := Round(FScrollOrigin.Y);
|
||||
|
||||
if (SIF_RANGE and ScrollInfo.fMask) > 0 then
|
||||
begin
|
||||
if SBStyle = SB_HORZ then
|
||||
@ -927,6 +922,11 @@ begin
|
||||
if SBStyle = SB_VERT then
|
||||
FScrollPageSize.Y := ScrollInfo.nPage;
|
||||
end;
|
||||
|
||||
if SBStyle = SB_HORZ then
|
||||
Result := Round(FScrollOrigin.X);
|
||||
if SBStyle = SB_VERT then
|
||||
Result := Round(FScrollOrigin.Y);
|
||||
|
||||
if (SBStyle in [SB_HORZ, SB_VERT]) and
|
||||
((ScrollInfo.fMask and (SIF_RANGE or SIF_POS or SIF_PAGE)) > 0) then
|
||||
|
@ -3092,7 +3092,7 @@ end;
|
||||
SBStyle - Scroll bar flag
|
||||
ScrollInfo - Scrolling info
|
||||
bRedraw - Redraw the scroll bar?
|
||||
Returns: The old position value
|
||||
Returns: The new position value
|
||||
|
||||
Sets the parameters of a scroll bar
|
||||
------------------------------------------------------------------------------}
|
||||
@ -3113,7 +3113,6 @@ begin
|
||||
if not CheckWidget(Handle, 'SetScrollInfo', TCarbonControl) then Exit;
|
||||
|
||||
CarbonControl := TCarbonControl(Handle);
|
||||
Result := CarbonControl.GetValue;
|
||||
|
||||
if (SIF_RANGE and ScrollInfo.fMask) > 0 then
|
||||
begin
|
||||
@ -3124,6 +3123,8 @@ begin
|
||||
CarbonControl.SetValue(ScrollInfo.nPos);
|
||||
if (SIF_PAGE and ScrollInfo.fMask) > 0 then
|
||||
CarbonControl.SetViewSize(ScrollInfo.nPage);
|
||||
|
||||
Result := CarbonControl.GetValue;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user