changeset 94e074c12910 in sao:6.4
details: https://hg.tryton.org/sao?cmd=changeset&node=94e074c12910
description:
        Hide text overflow only for some buttons

        Setting overflow-y to hidden makes Chrome changes the overflow-x to 
auto.
        Then badges on toolbar which are overflow the button create a scrollbar.
        The text overflow is only needed for buttons with dynamic text.

        issue11565
        review425471003
        (grafted from d4a21d51caf553eb4a55fe58c6195ad75188f658)
diffstat:

 src/common.js |  5 +++--
 src/sao.less  |  5 ++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r f8a74ce6ff31 -r 94e074c12910 src/common.js
--- a/src/common.js     Sat Jul 30 11:08:37 2022 +0200
+++ b/src/common.js     Sat Jul 30 11:12:40 2022 +0200
@@ -884,8 +884,9 @@
                 }).prependTo(this.el);
                 this.icon.hide();
             }
-            this.el.addClass(
-                ['btn', (style || 'btn-default'), (size || '')].join(' '));
+            this.el.addClass([
+                'btn', 'btn-horizontal',
+                (style || 'btn-default'), (size || '')].join(' '));
             this.el.attr('type', 'button');
             this.icon.attr('aria-hidden', true);
             this.set_icon(attributes.icon);
diff -r f8a74ce6ff31 -r 94e074c12910 src/sao.less
--- a/src/sao.less      Sat Jul 30 11:08:37 2022 +0200
+++ b/src/sao.less      Sat Jul 30 11:12:40 2022 +0200
@@ -42,9 +42,8 @@
     }
 }
 
-button {
-    overflow-y: hidden;
-    text-overflow: ellipsis;
+.btn-horizontal {
+    .text-overflow()
 }
 
 .input-group > .form-control-feedback {

Reply via email to