details:   https://code.tryton.org/tryton/commit/7d2e1761cee2
branch:    default
user:      Cédric Krier <[email protected]>
date:      Sat Apr 11 08:42:50 2026 +0200
description:
        Move the sortable icon of table column outside of the label

        This ensure that the labels have the same height even if they are or not
        sortable.

        Closes #14762
diffstat:

 sao/src/sao.less     |  15 +++++++++------
 sao/src/view/tree.js |  10 +++++++---
 2 files changed, 16 insertions(+), 9 deletions(-)

diffs (63 lines):

diff -r 2119eb220225 -r 7d2e1761cee2 sao/src/sao.less
--- a/sao/src/sao.less  Thu Apr 09 18:24:39 2026 +0200
+++ b/sao/src/sao.less  Sat Apr 11 08:42:50 2026 +0200
@@ -919,14 +919,17 @@
                 cursor: pointer;
             }
 
-            > label {
-                display: inline-block;
+            > div {
+                display: flex;
                 overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-                margin: 0;
-                vertical-align: bottom;
 
+                > label {
+                    margin: 0;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    width: 100%;
+                }
             }
 
             > div.resizer {
diff -r 2119eb220225 -r 7d2e1761cee2 sao/src/view/tree.js
--- a/sao/src/view/tree.js      Thu Apr 09 18:24:39 2026 +0200
+++ b/sao/src/view/tree.js      Sat Apr 11 08:42:50 2026 +0200
@@ -212,9 +212,13 @@
                 });
                 th.uniqueId();
                 th.get(0).dataset.column = idx;
+                let header = jQuery('<div/>', {
+                    'class': 'header',
+                });
                 var label = jQuery('<label/>')
                     .text(column.attributes.string)
-                    .attr('title', column.attributes.string);
+                    .attr('title', column.attributes.string)
+                    .appendTo(header);
                 if (this.editable) {
                     if (column.attributes.required) {
                         label.addClass('required');
@@ -230,7 +234,7 @@
                     var arrow = jQuery('<img/>', {
                         'class': 'icon',
                     });
-                    label.append(arrow);
+                    header.append(arrow);
                     column.arrow = arrow;
                     th.click(column, (e) => {
                         if (is_resizing) {
@@ -241,7 +245,7 @@
                     });
                     th.addClass('sortable');
                 }
-                tr.append(th.append(label));
+                tr.append(th.append(header));
                 let resizer = jQuery('<div/>', {
                     'class': 'resizer',
                     'draggable': true,

Reply via email to