From 8fd3ccc4d8aaaee3b565b295ae74120ff3e81833 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Thu, 29 May 2025 16:53:34 +0300 Subject: [PATCH] Repaint buttons --- apps/common/main/lib/component/Button.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 627b95af7a..7904d58d2d 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -643,6 +643,8 @@ define([ var ariaLabel = me.options.ariaLabel ? me.options.ariaLabel : ((typeof me.options.hint == 'string') ? me.options.hint : me.options.hint[0]); $btn.attr('aria-label', ariaLabel); } + + Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this)); } me.rendered = true; @@ -1035,6 +1037,13 @@ define([ if (!this.disabled) { this.split ? this.cmpEl.attr('tabindex', this.tabindex) : this.$el && this.$el.find('button').addBack().filter('button').attr('tabindex', this.tabindex); } + }, + + onThemeChanged: function() { + if (this.options.width>0 && this.rendered) { + var el = this.cmpEl; + el && el.hasClass('btn-group') && el.hasClass('split') && $('button:first', el).css('width', this.options.width - $('[data-toggle^=dropdown]', el).outerWidth()); + } } });