mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
Qt5,Qt6: Fixed ugly item sizes in TListView with ViewStyle vsIcon,vsSmallIcon. issue #23187
(cherry picked from commit f9e932cb46
)
Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
parent
cfd24b5c32
commit
c8c5d06ff9
@ -739,6 +739,7 @@ begin
|
||||
QtListWidget.setWrapping(IconOptions.AutoArrange);
|
||||
QtListWidget.setViewFlow(IconArngToQListFlow[IconOptions.Arrangement]);
|
||||
QtListWidget.setWordWrap(IconOptions.WrapText);
|
||||
QtListWidget.setUniformItemSizes(IconOptions.WrapText);
|
||||
end;
|
||||
|
||||
end else
|
||||
@ -841,7 +842,7 @@ begin
|
||||
Exit(-1);
|
||||
|
||||
// TODO: columns in vsIcon mode
|
||||
if IsIconView(ALV) then
|
||||
if IsIconView(ALV) or (csDestroyingHandle in ALV.ControlState) then
|
||||
exit(0);
|
||||
|
||||
QtTreeWidget := TQtTreeWidget(ALV.Handle);
|
||||
|
@ -737,6 +737,7 @@ begin
|
||||
QtListWidget.setWrapping(IconOptions.AutoArrange);
|
||||
QtListWidget.setViewFlow(IconArngToQListFlow[IconOptions.Arrangement]);
|
||||
QtListWidget.setWordWrap(IconOptions.WrapText);
|
||||
QtListWidget.setUniformItemSizes(IconOptions.WrapText);
|
||||
end;
|
||||
|
||||
end else
|
||||
@ -839,7 +840,7 @@ begin
|
||||
Exit(-1);
|
||||
|
||||
// TODO: columns in vsIcon mode
|
||||
if IsIconView(ALV) then
|
||||
if IsIconView(ALV) or (csDestroyingHandle in ALV.ControlState) then
|
||||
exit(0);
|
||||
|
||||
QtTreeWidget := TQtTreeWidget(ALV.Handle);
|
||||
@ -849,7 +850,6 @@ begin
|
||||
unfortunatelly it''s hardcoded in listcolumn.inc.}
|
||||
if (csDesigning in ALV.ComponentState) and (QtTreeWidget.ColCount <> ALV.ColumnCount) then
|
||||
exit(50);
|
||||
|
||||
Result := QtTreeWidget.ColWidth[AIndex];
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user