From 18d62c36ade074ca63b509bca072f9bbac4633bf Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 17 Feb 2024 16:53:45 +0100 Subject: [PATCH] UI: Tweak extensions repository panel Reduce the width size and align the URL with the UIList. Adjustments that would still be welcome: * Make URL label color the same as Advanced. * Waste less space between URL and the [________________]. --- scripts/startup/bl_ui/space_userpref.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index 1a7914c864b..95e2638fd9e 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -2025,7 +2025,7 @@ class USERPREF_PT_extensions_repos(Panel): bl_region_type = 'HEADER' # Show wider than most panels so the URL & directory aren't overly clipped. - bl_ui_units_x = 24 + bl_ui_units_x = 16 # NOTE: ideally `if panel := layout.panel("extensions_repo_advanced", default_closed=True):` # would be used but it isn't supported here, use a kludge to achieve a similar UI. @@ -2082,8 +2082,6 @@ class USERPREF_PT_extensions_repos(Panel): if active_repo is None: return - layout.separator() - # NOTE: changing repositories from remote to local & vice versa could be supported but is obscure enough # that it can be hidden entirely. If there is a some justification to show this, it can be exposed. # For now it can be accessed from Python if someone is. @@ -2091,9 +2089,11 @@ class USERPREF_PT_extensions_repos(Panel): if active_repo.use_remote_path: row = layout.row() + split = row.split(factor=0.936) if active_repo.remote_path == "": - row.alert = True - row.prop(active_repo, "remote_path", text="URL") + split.alert = True + split.prop(active_repo, "remote_path", text="URL") + split = row.split() if layout_panel := self._panel_layout_kludge(layout, text="Advanced"):