mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:59:07 +02:00
Gtk3: fixed memleak and list usage. Patch by Anton Kavalenka, modified by me. issue #41375
This commit is contained in:
parent
f302e2508c
commit
572cc8bbf4
@ -108,8 +108,8 @@ begin
|
|||||||
ypad := 0;
|
ypad := 0;
|
||||||
if aList = nil then
|
if aList = nil then
|
||||||
exit;
|
exit;
|
||||||
PGtkCellRenderer(aList[0].data)^.get_padding(@xpad, @ypad);
|
PGtkCellRenderer(g_list_nth_data(aList, 0))^.get_padding(@xpad, @ypad);
|
||||||
g_free(aList);
|
g_list_free(aList);
|
||||||
|
|
||||||
GetStyleContextSizes(aCombo^.priv3^.button, ABorder, AMargin, APadding, w, h);
|
GetStyleContextSizes(aCombo^.priv3^.button, ABorder, AMargin, APadding, w, h);
|
||||||
aContext := PGtkCellView(ACombo^.priv3^.cell_view)^.get_pango_context;
|
aContext := PGtkCellView(ACombo^.priv3^.cell_view)^.get_pango_context;
|
||||||
@ -123,6 +123,7 @@ begin
|
|||||||
min_height^ := h + ABorder.Top + ABorder.Bottom + AMargin.Top + AMargin.Bottom + APadding.Top + APadding.Bottom + (ypad * 2);
|
min_height^ := h + ABorder.Top + ABorder.Bottom + AMargin.Top + AMargin.Bottom + APadding.Top + APadding.Bottom + (ypad * 2);
|
||||||
if Assigned(nat_height) then
|
if Assigned(nat_height) then
|
||||||
nat_height^ := min_height^;
|
nat_height^ := min_height^;
|
||||||
|
aPangoLayout^.unref;
|
||||||
end;
|
end;
|
||||||
exit; // keep gtk calculated height.
|
exit; // keep gtk calculated height.
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user