[pve-devel] [PATCH widget-toolkit 2/2] use the width-helper from utils

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Mar 25 09:37:06 CET 2022


please add a prefixing tag to the comment subject:

apt repos: use new button max-width helper from utils

On 24.03.22 12:33, Matthias Heiserer wrote:
> Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
> ---
>  src/node/APTRepositories.js | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
> index 09ed0be..d63a569 100644
> --- a/src/node/APTRepositories.js
> +++ b/src/node/APTRepositories.js
> @@ -230,16 +230,7 @@ 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 });
> -		},
> +		render: Proxmox.Utils.calculateWidth,
>  	    },
>  	},
>      ],






More information about the pve-devel mailing list