LCL-GTK2: Fix TListView column widths. Issue #34044, patch from accorp.

git-svn-id: trunk@59047 -
This commit is contained in:
juha 2018-09-17 19:30:11 +00:00
parent 62c05b07e0
commit 5102a7739e

View File

@ -814,7 +814,11 @@ begin
Exit;
GtkColumn := gtk_tree_view_get_column(PGtkTreeView(Widgets^.MainView), AIndex);
if GtkColumn <> nil then
begin
Result := gtk_tree_view_column_get_width(GtkColumn);
if Result = 0 then
Result := gtk_tree_view_column_get_fixed_width(GtkColumn);
end;
end;
class procedure TGtk2WSCustomListView.ColumnInsert(const ALV: TCustomListView;
@ -1048,7 +1052,10 @@ begin
Exit;
GtkColumn := gtk_tree_view_get_column(PGtkTreeView(Widgets^.MainView), AIndex);
if GtkColumn <> nil then
begin
GtkColumn^.width := 0;
gtk_tree_view_column_set_fixed_width(GtkColumn, AWidth + Ord(AWidth<1));
end;
end;
class procedure TGtk2WSCustomListView.ColumnSetVisible(const ALV: TCustomListView;