From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v2] ui: fix column behavior with browser scaling
Date: Mon, 16 Nov 2020 18:23:03 +0100 [thread overview]
Message-ID: <91a49a09-eee2-3ed5-68ed-35dab9d6284b@proxmox.com> (raw)
In-Reply-To: <20201102140102.26141-1-a.lauterer@proxmox.com>
On 02.11.20 15:01, Aaron Lauterer wrote:
> 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>
> ---
> v1 -> v2: changed approach, use HBOX layouts instead of columns with
> columnwidths slightly lower than 0.5.
@Dominik, can you please take a look at this and apply (or a Reviewed-by tag).
>
> www/manager6/window/Clone.js | 7 +++----
> www/manager6/window/Migrate.js | 8 +++-----
> www/manager6/window/Settings.js | 9 +++------
> 3 files changed, 9 insertions(+), 15 deletions(-)
>
> diff --git a/www/manager6/window/Clone.js b/www/manager6/window/Clone.js
> index 5c6c2f75..95ab1cd7 100644
> --- a/www/manager6/window/Clone.js
> +++ b/www/manager6/window/Clone.js
> @@ -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
> diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
> index 3096dd1a..91d1b30b 100644
> --- a/www/manager6/window/Migrate.js
> +++ b/www/manager6/window/Migrate.js
> @@ -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',
> diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js
> index e3519b1f..3bf974f0 100644
> --- a/www/manager6/window/Settings.js
> +++ b/www/manager6/window/Settings.js
> @@ -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%',
>
next prev parent reply other threads:[~2020-11-16 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 14:01 Aaron Lauterer
2020-11-02 14:01 ` [pve-devel] [PATCH widget-toolkit v2] InputPanel: fix column scaling behavior Aaron Lauterer
2020-11-17 9:29 ` Dominik Csapak
2020-11-17 11:41 ` Aaron Lauterer
2020-11-17 12:05 ` Dominik Csapak
2020-11-17 12:43 ` Aaron Lauterer
2020-11-16 17:23 ` Thomas Lamprecht [this message]
2020-11-17 9:26 ` [pve-devel] applied: [PATCH manager v2] ui: fix column behavior with browser scaling Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91a49a09-eee2-3ed5-68ed-35dab9d6284b@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox