Compute the minimal width of a treeview on display as it's done when parsing

Closes #15094
This commit is contained in:
Nicolas Évrard
2026-10-01 15:32:58 +02:00
parent 5a7e5d0452
commit f4372108c2
+5 -3
View File
@@ -1101,11 +1101,13 @@
width = column.col.data('default-width');
}
if (width && width.endsWith('%')) {
width = parseInt(width.slice(0, -1), 10) / 100;
// Reverse the calculation from _set_column_width
let factor = 1;
if (column.attributes.expand) {
width /= parseInt(column.attributes.expand, 10);
factor += parseInt(column.attributes.expand, 10);
}
width = `${width}em`;
width = parseInt(width.slice(0, -1), 10);
width = `${width / 100 / factor}em`;
}
min_width.push(width);
column.col.sao_show();