ui: fix column behavior with browser scaling

especially on chromium based browser (e.g. chrome, edge) it can happen,
depending on the zoom level, that the last column does not fit next to
the other columns and is moved below the other columns.

This results in an ugly looking UI and in the worst case makes it
unusable.

This can also be triggered if the monitor is set to a higher scaling /
different DPI settings. I was able to have the same problem in Edge when
setting the scaling in the windows display settings to 125% (Clone VM).

Changing the layout from columns with 0.5 width to extjs HBOXes with
flex 1 works as expected.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
Aaron Lauterer 2020-11-02 15:01:01 +01:00 committed by Dominik Csapak
parent b15bdd864e
commit d27a44a615
3 changed files with 9 additions and 15 deletions

View File

@ -256,22 +256,21 @@ Ext.define('PVE.window.Clone', {
bodyPadding: 10,
reference: 'cloneform',
border: false,
layout: 'column',
layout: 'hbox',
defaultType: 'container',
columns: 2,
fieldDefaults: {
labelWidth: 100,
anchor: '100%'
},
items: [
{
columnWidth: 0.5,
flex: 1,
padding: '0 10 0 0',
layout: 'anchor',
items: col1
},
{
columnWidth: 0.5,
flex: 1,
padding: '0 0 0 10',
layout: 'anchor',
items: col2

View File

@ -308,13 +308,11 @@ Ext.define('PVE.window.Migrate', {
reference: 'formPanel',
bodyPadding: 10,
border: false,
layout: {
type: 'column'
},
layout: 'hbox',
items: [
{
xtype: 'container',
columnWidth: 0.5,
flex: 1,
items: [{
xtype: 'displayfield',
name: 'source',
@ -334,7 +332,7 @@ Ext.define('PVE.window.Migrate', {
},
{
xtype: 'container',
columnWidth: 0.5,
flex: 1,
items: [{
xtype: 'pveNodeSelector',
reference: 'pveNodeSelector',

View File

@ -23,10 +23,7 @@ Ext.define('PVE.window.Settings', {
}
],
layout: {
type: 'column',
align: 'top'
},
layout: 'hbox',
controller: {
xclass: 'Ext.app.ViewController',
@ -185,7 +182,7 @@ Ext.define('PVE.window.Settings', {
items: [{
xtype: 'fieldset',
columnWidth: 0.5,
flex: 1,
title: gettext('Webinterface Settings'),
margin: '5',
layout: {
@ -311,7 +308,7 @@ Ext.define('PVE.window.Settings', {
{
xtype: 'container',
layout: 'vbox',
columnWidth: 0.5,
flex: 1,
margin: '5',
defaults: {
width: '100%',