UI: move toggle icons out of layout checks into rna

This commit is contained in:
Campbell Barton
2014-01-30 16:24:51 +11:00
parent 9598990b9b
commit 5f47f1370e
11 changed files with 24 additions and 28 deletions

View File

@@ -427,12 +427,12 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
sub = row.row(align=True)
sub.active = (not strip.mute)
sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
row.prop(strip, "mute", toggle=True, icon_only=True)
row.prop(strip, "lock", toggle=True, icon_only=True)
else:
row = layout.row(align=True)
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF')
row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED')
row.prop(strip, "mute", toggle=True, icon_only=True)
row.prop(strip, "lock", toggle=True, icon_only=True)
col = layout.column()
sub = col.column()