details: https://code.tryton.org/tryton/commit/38edbf96602b
branch: default
user: Nicolas Évrard <[email protected]>
date: Thu Oct 01 15:32:58 2026 +0200
description:
Compute the minimal width of a treeview on display as it's done when
parsing
Closes #15094
diffstat:
sao/src/view/tree.js | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r d1a34cc4ffd8 -r 38edbf96602b sao/src/view/tree.js
--- a/sao/src/view/tree.js Wed Sep 30 09:55:32 2026 +0200
+++ b/sao/src/view/tree.js Thu Oct 01 15:32:58 2026 +0200
@@ -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();