Minor adjustments to keymap editor layouts

* 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
This commit is contained in:
Julian Eisel 2016-02-20 00:42:07 +01:00
parent 8d73805df0
commit a529ad9707
1 changed files with 6 additions and 4 deletions

View 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()