mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 20:20:23 +02:00
cocoa: restore the frame size after calling sizetoFit in fittingSize. Prevents SpinEdit from resizing. #33616
git-svn-id: trunk@57734 -
This commit is contained in:
parent
4eac309f55
commit
f84ad3c0b2
@ -5515,12 +5515,16 @@ begin
|
||||
end;
|
||||
|
||||
function TCocoaSpinEdit.fittingSize: NSSize;
|
||||
var
|
||||
fr : NSRect;
|
||||
begin
|
||||
Result.width := -1;
|
||||
fr:=frame;
|
||||
sizeToFit();
|
||||
Result.height := bounds.size.height;
|
||||
if not NSEqualRects(frame, fr) then setFrame(fr); // prevent changes of frame after sizeToFit();
|
||||
{$IFDEF COCOA_SPIN_DEBUG}
|
||||
WriteLn('[TCocoaSpinEdit.fittingSize] width=', Result.width, ' height=', Result.height);
|
||||
WriteLn('[TCocoaSpinEdit.fittingSize] width=', Result.width:0:0, ' height=', Result.height:0:0);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user