Skip to content

Commit

Permalink
Merge pull request #33 from pehala/ui_fixes
Browse files Browse the repository at this point in the history
UI fixes
  • Loading branch information
pehala authored Feb 25, 2023
2 parents b5505e4 + f12bbb6 commit bb3b51a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
8 changes: 3 additions & 5 deletions animationCombiner/api/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ def draw(self, layout):
row = layout.row()
row.enabled = False
row.prop(self, "path")
row = layout.row()
row = layout.column_flow(columns=1)
row.prop(self, "name")

row = layout.row()
row.label(text="Animation length settings:")
self.length_group.draw(layout.box())
row = layout.row()
self.length_group.draw(row.box())
row.label(text="Transition settings:")
self.transition.draw(layout.box())
self.transition.draw(row.box())
16 changes: 8 additions & 8 deletions animationCombiner/ui/action_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def draw_item(self, context, layout, data, item, icon, active_data, active_propn
if ma:
sub = layout.split(factor=0.4, align=True)
sub.prop(ma, "name", text="", emboss=False, icon_value=icon)
sub.prop(ma.length_group, "length", text="", emboss=False, icon_value=icon, expand=True)
column = sub.column()
column.enabled = False
column.prop(ma.length_group, "length", text="", emboss=False, icon_value=icon, expand=True)
else:
layout.label(text="", translate=False, icon_value=icon)
# 'GRID' layout type should be as compact as possible (typically a single icon!).
Expand Down Expand Up @@ -66,13 +68,11 @@ def draw(self, context):
row.label(text="Final length")
row.prop(obj, "animation_length", slider=False, text="")

col = layout.column(align=True)
row = col.row(align=True)
row.operator(ImportActionOperator.bl_idname, text='Import', icon="IMPORT")
row.operator(DeleteItem.bl_idname, text='Delete', icon="REMOVE")
row = col.row(align=True)
row.operator(MoveItem.bl_idname, text='Up', icon="TRIA_UP").direction = 'UP'
row.operator(MoveItem.bl_idname, text='Down', icon="TRIA_DOWN").direction = 'DOWN'
col = layout.column_flow(columns=2, align=True)
col.operator(ImportActionOperator.bl_idname, text='Import', icon="IMPORT")
col.operator(DeleteItem.bl_idname, text='Delete', icon="REMOVE")
col.operator(MoveItem.bl_idname, text='Up', icon="TRIA_UP").direction = 'UP'
col.operator(MoveItem.bl_idname, text='Down', icon="TRIA_DOWN").direction = 'DOWN'

sublayout = layout.box()
if obj.active >= 0 and obj.actions:
Expand Down

0 comments on commit bb3b51a

Please sign in to comment.