[pve-devel] [PATCH v2 widget-toolkit 3/3] apt repos: use new AltText button
Matthias Heiserer
m.heiserer at proxmox.com
Mon Mar 28 15:07:36 CEST 2022
text is not needed with the AltText button.
Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---
src/node/APTRepositories.js | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index 09ed0be..ce8f718 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -193,8 +193,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
},
'-',
{
- xtype: 'proxmoxButton',
- text: gettext('Enable'),
+ xtype: 'proxmoxAltTextButton',
defaultText: gettext('Enable'),
altText: gettext('Disable'),
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 });
- },
- },
},
],
--
2.30.2
More information about the pve-devel
mailing list