mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-17 08:46:55 +00:00
apt repos: use new AltText button
text is not needed with the AltText button. Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
463177281c
commit
8832b5909f
@ -193,8 +193,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
|||||||
},
|
},
|
||||||
'-',
|
'-',
|
||||||
{
|
{
|
||||||
xtype: 'proxmoxButton',
|
xtype: 'proxmoxAltTextButton',
|
||||||
text: gettext('Enable'),
|
|
||||||
defaultText: gettext('Enable'),
|
defaultText: gettext('Enable'),
|
||||||
altText: gettext('Disable'),
|
altText: gettext('Disable'),
|
||||||
name: 'repoEnable',
|
name: 'repoEnable',
|
||||||
@ -229,18 +228,6 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
listeners: {
|
|
||||||
render: function(btn) {
|
|
||||||
// HACK: calculate the max button width on first render to avoid toolbar glitches
|
|
||||||
let defSize = btn.getSize().width;
|
|
||||||
|
|
||||||
btn.setText(btn.altText);
|
|
||||||
let altSize = btn.getSize().width;
|
|
||||||
|
|
||||||
btn.setText(btn.defaultText);
|
|
||||||
btn.setSize({ width: altSize > defSize ? altSize : defSize });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user