public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/3] headerbar: center search box, make it adapt to the width of the browser
Date: Fri, 21 Jul 2023 11:39:10 +0200	[thread overview]
Message-ID: <20230721093910.254158-3-l.wagner@proxmox.com> (raw)
In-Reply-To: <20230721093910.254158-1-l.wagner@proxmox.com>

Also adding a minWidth/maxWidth so that it doesn't become comically
large or small. The minimum size is roughly the same size as the
search bar was before. The maxmium size is the same size as the
results grid, making them align nicely.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---

Notes:
    Played around a bit and found the centered search visually quite pleasing.
    A few other people in the office also liked it.

 www/manager6/Workspace.js              | 7 +++++--
 www/manager6/form/GlobalSearchField.js | 2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 006e7f29..b8901912 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -337,12 +337,16 @@ Ext.define('PVE.StdWorkspace', {
 			    },
 			    padding: '0 0 0 5',
 			},
+			{
+			    flex: 0.5,
+			},
 			{
 			    xtype: 'pveGlobalSearchField',
 			    tree: rtree,
+			    flex: 1.60,
 			},
 			{
-			    flex: 1,
+			    flex: 0.5,
 			},
 			{
 			    xtype: 'proxmoxHelpButton',
@@ -530,4 +534,3 @@ Ext.define('PVE.StdWorkspace', {
 	});
     },
 });
-
diff --git a/www/manager6/form/GlobalSearchField.js b/www/manager6/form/GlobalSearchField.js
index 8e5e13c0..ee352cdc 100644
--- a/www/manager6/form/GlobalSearchField.js
+++ b/www/manager6/form/GlobalSearchField.js
@@ -12,6 +12,8 @@ Ext.define('PVE.form.GlobalSearchField', {
     enableKeyEvents: true,
     selectOnFocus: true,
     padding: '0 5 0 5',
+    minWidth: 200,
+    maxWidth: 600,
 
     grid: {
 	xtype: 'gridpanel',
-- 
2.39.2





  parent reply	other threads:[~2023-07-21  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  9:39 [pve-devel] [PATCH manager 1/3] headerbar: use same height and padding for product name as PBS and PMG Lukas Wagner
2023-07-21  9:39 ` [pve-devel] [PATCH manager 2/3] headerbar: show shortcut for search in emptyText Lukas Wagner
2023-07-21 13:31   ` Thomas Lamprecht
2023-07-21 14:04     ` Lukas Wagner
2023-07-21  9:39 ` Lukas Wagner [this message]
2023-07-21 13:54   ` [pve-devel] [PATCH manager 3/3] headerbar: center search box, make it adapt to the width of the browser Thomas Lamprecht
2023-07-21 14:54     ` Lukas Wagner
2023-07-21 14:04 ` [pve-devel] [PATCH manager 1/3] headerbar: use same height and padding for product name as PBS and PMG Thomas Lamprecht
2023-07-24  8:25   ` Lukas Wagner

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=20230721093910.254158-3-l.wagner@proxmox.com \
    --to=l.wagner@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal