Minor adjustments to keymap editor layouts
authorJulian Eisel <eiseljulian@gmail.com>
Fri, 19 Feb 2016 23:42:07 +0000 (00:42 +0100)
committerJulian Eisel <eiseljulian@gmail.com>
Fri, 19 Feb 2016 23:46:17 +0000 (00:46 +0100)
* Remove unnecessary big margins after triangle icons (esp. for keymap items they where waaay to big)
* Remove ugly margin after "Foo (Global)" entries
* Add little margin after expanded key maps

release/scripts/modules/rna_keymap_ui.py

index 5abd6bf64092a76c9696730fb060c67715ebbc8f..2ca7a7997a5cc37d406f837cb763632666ee86f0 100644 (file)
@@ -70,7 +70,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
 
     col = _indented_layout(layout, level)
 
-    row = col.row()
+    row = col.row(align=True)
     row.prop(km, "show_expanded_children", text="", emboss=False)
     row.label(text=km.name, text_ctxt=i18n_contexts.id_windowmanager)
 
@@ -89,7 +89,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
             # Put the Parent key map's entries in a 'global' sub-category
             # equal in hierarchy to the other children categories
             subcol = _indented_layout(col, level + 1)
-            subrow = subcol.row()
+            subrow = subcol.row(align=True)
             subrow.prop(km, "show_expanded_items", text="", emboss=False)
             subrow.label(text=iface_("%s (Global)") % km.name, translate=False)
         else:
@@ -107,13 +107,15 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
             subcol.operator("wm.keyitem_add", text="Add New", text_ctxt=i18n_contexts.id_windowmanager,
                             icon='ZOOMIN')
 
-        col.separator()
+            col.separator()
 
         # Child key maps
         if children:
             for entry in children:
                 draw_entry(display_keymaps, entry, col, level + 1)
 
+        col.separator()
+
 
 def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
     map_type = kmi.map_type
@@ -126,7 +128,7 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
     else:
         box = col.column()
 
-    split = box.split(percentage=0.05)
+    split = box.split(percentage=0.01)
 
     # header bar
     row = split.row()