mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
Cocoa: Fix code assumption that target is always TScrollingWinControl
This commit is contained in:
parent
62fddfd5f2
commit
83940629e2
@ -1086,18 +1086,20 @@ begin
|
||||
|
||||
inherited setFrame(aframe);
|
||||
|
||||
lclControl:= TScrollingWinControl(lclGetTarget);
|
||||
newDocSize:= contentSize;
|
||||
if lclGetTarget is TScrollingWinControl then begin
|
||||
lclControl:= TScrollingWinControl(lclGetTarget);
|
||||
newDocSize:= contentSize;
|
||||
|
||||
lclBar:= lclControl.HorzScrollBar;
|
||||
if lclBar.Visible and (lclBar.Range<>0) and (lclBar.Range>lclBar.Page) then
|
||||
newDocSize.Width:= lclBar.Range;
|
||||
lclBar:= lclControl.HorzScrollBar;
|
||||
if lclBar.Visible and (lclBar.Range<>0) and (lclBar.Range>lclBar.Page) then
|
||||
newDocSize.Width:= lclBar.Range;
|
||||
|
||||
lclBar:= lclControl.VertScrollBar;
|
||||
if lclBar.Visible and (lclBar.Range<>0) and (lclBar.Range>lclBar.Page) then
|
||||
newDocSize.Height:= lclBar.Range;
|
||||
lclBar:= lclControl.VertScrollBar;
|
||||
if lclBar.Visible and (lclBar.Range<>0) and (lclBar.Range>lclBar.Page) then
|
||||
newDocSize.Height:= lclBar.Range;
|
||||
|
||||
documentView.setFrameSize(newDocSize);
|
||||
documentView.setFrameSize(newDocSize);
|
||||
end;
|
||||
|
||||
if lclHorzScrollInfo.fMask<>0 then
|
||||
applyScrollInfo(SB_Horz, lclHorzScrollInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user