]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/button/AltText.js
1 Ext
.define('Proxmox.button.AltText', {
2 extend
: 'Proxmox.button.Button',
3 xtype
: 'proxmoxAltTextButton',
9 // HACK: calculate the max button width on first render to avoid toolbar glitches
10 render: function(button
) {
13 button
.setText(me
.altText
);
14 let altWidth
= button
.getSize().width
;
16 button
.setText(me
.defaultText
);
17 let defaultWidth
= button
.getSize().width
;
19 button
.setWidth(defaultWidth
> altWidth
? defaultWidth
: altWidth
);