Cocoa: Fix the issue where ListBox/ListView may be incorrectly set to a huge height

1. NSTableView.fittingSize returns the full height, not the visible height
2. the issue can be observed in IDE Options - Component Palette
This commit is contained in:
rich2014 2024-01-24 00:19:11 +08:00
parent a284237384
commit 56d9ea7958

View File

@ -94,6 +94,7 @@ type
function initWithFrame(frameRect: NSRect): id; override;
procedure dealloc; override;
function fittingSize: NSSize; override;
procedure drawRow_clipRect(row: NSInteger; clipRect: NSRect); override;
procedure drawRect(dirtyRect: NSRect); override;
@ -505,6 +506,11 @@ begin
inherited dealloc;
end;
function TCocoaTableListView.fittingSize: NSSize;
begin
Result:= NSZeroSize;
end;
procedure TCocoaTableListView.drawRow_clipRect(row: NSInteger; clipRect: NSRect
);
var