mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 20:50:18 +02:00
Cocoa: ensure that in extreme cases, the Scroller can remain Horizontal/Vertical unchanged
This commit is contained in:
parent
ccadb8bbdd
commit
551af85901
@ -1680,11 +1680,17 @@ begin
|
||||
vertScrollerFrame.origin.x := docFrame.size.width - vertScrollerFrame.size.width;
|
||||
vertScrollerFrame.origin.y := docFrame.origin.y;
|
||||
|
||||
if Assigned(horzScroller) then
|
||||
if Assigned(horzScroller) then begin
|
||||
if horzScrollerFrame.size.width <= horzScrollerFrame.size.height then
|
||||
horzScrollerFrame.size.width:= horzScrollerFrame.size.height + 1;
|
||||
horzScroller.setFrame(horzScrollerFrame);
|
||||
end;
|
||||
|
||||
if Assigned(vertScroller) then
|
||||
if Assigned(vertScroller) then begin
|
||||
if vertScrollerFrame.size.height <= vertScrollerFrame.size.width then
|
||||
vertScrollerFrame.size.height:= vertScrollerFrame.size.width + 1;
|
||||
vertScroller.setFrame(vertScrollerFrame);
|
||||
end;
|
||||
|
||||
if not NSEqualRects(doc.frame, docFrame) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user