From 455f5fe5edd869bcccaff3178e184ed5712504a4 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 23 Nov 2020 13:13:23 +0100 Subject: [PATCH] input panel: support convenience top column mirrors columnB (column bottom) but is placed on the top, i.e., columnT. One can no conveniently set the following layout: +-------------------------------------+ | | | columnT | | | +------------------+------------------+ | | | | | | | column1 | column2 | | | | | | | +------------------+------------------+ | | | columnB | | | +-------------------------------------+ (4 columns should work too, but we do not use that anywhere FWICT) Signed-off-by: Thomas Lamprecht --- src/panel/InputPanel.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/panel/InputPanel.js b/src/panel/InputPanel.js index c93f39d..67f7352 100644 --- a/src/panel/InputPanel.js +++ b/src/panel/InputPanel.js @@ -90,7 +90,15 @@ Ext.define('Proxmox.panel.InputPanel', { ]; me.items = undefined; } else if (me.column4) { - items = [ + items = []; + if (me.columnT) { + items.push({ + padding: '0 0 0 0', + layout: 'anchor', + items: me.columnT, + }); + } + items.push( { layout: 'hbox', defaults: { @@ -117,7 +125,7 @@ Ext.define('Proxmox.panel.InputPanel', { }, ], }, - ]; + ); if (me.columnB) { items.push({ padding: '10 0 0 0', @@ -126,7 +134,15 @@ Ext.define('Proxmox.panel.InputPanel', { }); } } else if (me.column1) { - items = [ + items = []; + if (me.columnT) { + items.push({ + padding: '0 0 10 0', + layout: 'anchor', + items: me.columnT, + }); + } + items.push( { layout: 'hbox', defaults: { @@ -145,7 +161,7 @@ Ext.define('Proxmox.panel.InputPanel', { }, ], }, - ]; + ); if (me.columnB) { items.push({ padding: '10 0 0 0',