From f4372108c260b86e1579e098e04994172dd21a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 1 Oct 2026 15:32:58 +0200 Subject: [PATCH] Compute the minimal width of a treeview on display as it's done when parsing Closes #15094 --- sao/src/view/tree.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index f1008910ab..f4d63c8dd0 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -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();