[pve-devel] [PATCH manager v2 09/10] Make room in QemuWizard and Edit Window so that the larger combo boxes properly fit

Emmanuel Kasper e.kasper at proxmox.com
Wed Sep 13 11:32:04 CEST 2017


Q

On 09/13/2017 07:09 AM, Thomas Lamprecht wrote:
> 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. :)

I put more stuff inside the combo box so it makes sense :)

> 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.

Why not.

> 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...

I am not a fan of magic width too, but I don't see an easy alternative here.




More information about the pve-devel mailing list