[Bf-extensions-cvs] [4820186b] master: Collection Manager: move location of remove op to far right. Task: T69577

Ryan Inch noreply at git.blender.org
Sun Nov 3 04:59:28 CET 2019


Commit: 4820186bcf9cf90146f2d6c9532410a884c8a04b
Author: Ryan Inch
Date:   Sat Nov 2 23:59:17 2019 -0400
Branches: master
https://developer.blender.org/rBAC4820186bcf9cf90146f2d6c9532410a884c8a04b

Collection Manager: move location of remove op to far right. Task: T69577

===================================================================

M	collection_manager/__init__.py
M	collection_manager/ui.py

===================================================================

diff --git a/collection_manager/__init__.py b/collection_manager/__init__.py
index f5afe58a..3406def1 100644
--- a/collection_manager/__init__.py
+++ b/collection_manager/__init__.py
@@ -23,7 +23,7 @@ bl_info = {
     "name": "Collection Manager",
     "description": "Manage collections and their objects",
     "author": "Ryan Inch",
-    "version": (1,1),
+    "version": (1,1,1),
     "blender": (2, 80, 0),
     "location": "View3D - Object Mode",
     "warning": '',  # used for warning icon and text in addons panel
diff --git a/collection_manager/ui.py b/collection_manager/ui.py
index 971d8a4a..234f47e1 100644
--- a/collection_manager/ui.py
+++ b/collection_manager/ui.py
@@ -122,12 +122,11 @@ class CollectionManager(Operator):
         #context.scene.CMListIndex = 0
         update_property_group(context)
         
-        if get_max_lvl() > 5:
-            lvl = get_max_lvl() - 5
+        lvl = get_max_lvl()
         
         if lvl > 25:
             lvl = 25
-        
+
         self.view_layer = context.view_layer.name
         
         return wm.invoke_popup(self, width=(400+(lvl*20)))
@@ -143,7 +142,8 @@ class CM_UL_items(UIList):
         laycol = layer_collections[item.name]
         collection = laycol["ptr"].collection
         
-        row = layout.row(align=True)
+        split = layout.split(factor=0.96)
+        row = split.row(align=True)
         row.alignment = 'LEFT'
         
         # indent child items
@@ -220,11 +220,10 @@ class CM_UL_items(UIList):
             icon = 'RESTRICT_RENDER_ON' if laycol["ptr"].collection.hide_render else 'RESTRICT_RENDER_OFF'
             row.operator("view3d.disable_render_collection", text="", icon=icon, emboss=False).name = item.name
         
-        row.separator()
-        #row.label(text="|")
-        row.separator()
         
-        row.operator("view3d.remove_collection", text="", icon='X', emboss=False).collection_name = item.name
+        rm_op = split.row()
+        rm_op.alignment = 'RIGHT'
+        rm_op.operator("view3d.remove_collection", text="", icon='X', emboss=False).collection_name = item.name
     
     
     def filter_items(self, context, data, propname):



More information about the Bf-extensions-cvs mailing list