]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
language selector: increase only picker list view
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Mar 2023 10:51:35 +0000 (11:51 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Mar 2023 11:24:20 +0000 (12:24 +0100)
As that's what matters for the selection, having parts of the already
selected language cut off is not really a big deal as either one
knows the language and the initial native part is enough or the
picker needs to be opened for changing selection anyway.

But, we can give the field itself a bit more space by reducing the
label width to 75, which is enough for all languages as grepping our
PO files for "Language" and their translation, it seems that the
widest one comes from Euskara (Basque) with its "Hizkuntza" having 9
characters.

This way we avoid having to many different

Fixes: 454ff6e ("language selector: increase field width")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/LanguageSelector.js
src/window/LanguageEdit.js

index 92f28b19f7b1867bca0f8e3677dce0a3250d6fdd..91679023c60992b624a3a08c553b9e607cce4e3c 100644 (file)
@@ -3,4 +3,9 @@ Ext.define('Proxmox.form.LanguageSelector', {
     xtype: 'proxmoxLanguageSelector',
 
     comboItems: Proxmox.Utils.language_array(),
+
+    matchFieldWidth: false,
+    listConfig: {
+       width: 300,
+    },
 });
index e1ba6cca5fec7c79f392354de9156bc95d517978..2269a45326f5b1a9451e05bf519e49e3c152c3ba 100644 (file)
@@ -35,10 +35,10 @@ Ext.define('Proxmox.window.LanguageEditWindow', {
        {
            xtype: 'proxmoxLanguageSelector',
            fieldLabel: gettext('Language'),
+           labelWidth: 75,
            bind: {
                value: '{language}',
            },
-           width: 400,
        },
     ],
     buttons: [