mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:39:21 +02:00
Cocoa: dynamically set the spacing of TListView with icons
This commit is contained in:
parent
fa87c8a5bf
commit
6b6edf7857
@ -1608,9 +1608,15 @@ class procedure TCocoaWSCustomListView.SetImageList(const ALV: TCustomListView;
|
|||||||
var
|
var
|
||||||
lCocoaLV: TCocoaListView;
|
lCocoaLV: TCocoaListView;
|
||||||
lTableLV: TCocoaTableListView;
|
lTableLV: TCocoaTableListView;
|
||||||
|
spacing: NSSize;
|
||||||
begin
|
begin
|
||||||
if not CheckParams(lCocoaLV, lTableLV, ALV) then Exit;
|
if not CheckParams(lCocoaLV, lTableLV, ALV) then Exit;
|
||||||
lTableLV.lclSetImagesInCell(Assigned(AValue));
|
lTableLV.lclSetImagesInCell(Assigned(AValue));
|
||||||
|
|
||||||
|
if AValue.Height < lTableLV.rowHeight-2 then Exit;
|
||||||
|
spacing:= lTableLV.intercellSpacing;
|
||||||
|
spacing.height:= lTableLV.rowHeight / 3 + 2;
|
||||||
|
lTableLV.setIntercellSpacing( spacing );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TCocoaWSCustomListView.SetItemsCount(
|
class procedure TCocoaWSCustomListView.SetItemsCount(
|
||||||
|
Loading…
Reference in New Issue
Block a user