On 09/12/2017 02:44 PM, Emmanuel Kasper wrote:
This will benefit the BusTypeSelector, the DiskFormatSelector, the CD 
FileSelector,
and possibily other long fields like vm name, pool name.
---
  www/manager6/form/ControllerSelector.js | 4 ++--
  www/manager6/qemu/CDEdit.js             | 3 +++
  www/manager6/qemu/CreateWizard.js       | 1 +
  www/manager6/qemu/HDEdit.js             | 3 +++
  www/manager6/window/Edit.js             | 3 +++
  5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/ControllerSelector.js 
b/www/manager6/form/ControllerSelector.js
index a2298fd8..a3205632 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -104,7 +104,7 @@ Ext.define('PVE.form.ControllerSelector', {
                    xtype: 'pveBusSelector',
                    name: 'controller',
                    value: PVE.qemu.OSDefaults.generic.busType,
-                   flex: 2,
+                   flex: 1,
                    listeners: {
                        change: function(t, value) {
                            if (!me.rendered || !value) {
@@ -119,10 +119,10 @@ Ext.define('PVE.form.ControllerSelector', {
                {
                    xtype: 'pveIntegerField',
                    name: 'deviceid',
+                   width: 50,
                    minValue: 0,
                    maxValue: PVE.form.ControllerSelector.maxIds.ide,
                    value: '0',
-                   flex: 1,
                    validator: function(value) {
                        /*jslint confusion: true */
                        if (!me.rendered) {
diff --git a/www/manager6/qemu/CDEdit.js b/www/manager6/qemu/CDEdit.js
index 51921b8d..0c660a1d 100644
--- a/www/manager6/qemu/CDEdit.js
+++ b/www/manager6/qemu/CDEdit.js
@@ -147,6 +147,9 @@ Ext.define('PVE.qemu.CDInputPanel', {
Ext.define('PVE.qemu.CDEdit', {
      extend: 'PVE.window.Edit',
+    fieldDefaults: {
+       width: 140
+    },
initComponent : function() {
        var me = this;
diff --git a/www/manager6/qemu/CreateWizard.js 
b/www/manager6/qemu/CreateWizard.js
index 944309a6..a01fc81b 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -2,6 +2,7 @@ Ext.define('PVE.qemu.CreateWizard', {
      extend: 'PVE.window.Wizard',
      alias: 'widget.pveQemuCreateWizard',
      qemuScsiController: undefined,
+    width: 680,


So my "increase create wizard" patch would make sense, after all. :)
Here you change the height/width ratio and do it only for VMs, not for CTs...
Not sure if that better than the approach I've taken, i.e. keep them both in
sync so that the wizard have a more consistent appearance and keep our old 
ratio.

But wider is more popular currently, as it seems, so maybe change the ratio
but I'd then sync up CTs wizard too.

The rest looks OK, even if I don't like fixed with. They are the cause of the
often to narrow column widths in grids where headings and/or data gets 
ellipsized
as they where all made with the older theme in mind, but that's another 
problem...

controller: { diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 9fbbc763..5d4e7c89 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -300,6 +300,9 @@ Ext.define('PVE.qemu.HDEdit', {
      extend: 'PVE.window.Edit',
isAdd: true,
+    fieldDefaults: {
+       width: 140
+    },
initComponent : function() {
        var me = this;
diff --git a/www/manager6/window/Edit.js b/www/manager6/window/Edit.js
index 9a026683..9941c5d1 100644
--- a/www/manager6/window/Edit.js
+++ b/www/manager6/window/Edit.js
@@ -259,6 +259,9 @@ Ext.define('PVE.window.Edit', {
            colwidth += me.fieldDefaults.labelWidth - 100;
        }
        
+       if (me.fieldDefaults && me.fieldDefaults.width) {
+           colwidth += me.fieldDefaults.width - 100;
+       }
var twoColumn = items[0].column1 || items[0].column2;


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to