mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 06:39:20 +02:00
Merge branch 'FixTScrollingWinControlAssumption' into 'main'
Cocoa: Fix code assumption that target is always TScrollingWinControl See merge request freepascal.org/lazarus/lazarus!378
This commit is contained in:
commit
ebf48ada11
@ -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