diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-30 06:47:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-30 06:47:27 +0300 |
commit | 2093b79ee746b15e5f55d703a1b6de60de940433 (patch) | |
tree | 956397056dc83211ee6005d68032183ca01c56a2 /release/scripts/startup/bl_ui/space_image.py | |
parent | e9c2477a8463d291f19cdb45d8667ece277aa20d (diff) |
Cleanup: inline icon conditional
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 8e163f86dc5..95c7072f14a 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -960,10 +960,13 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel): col.label(text="Curve:") row = col.row(align=True) - if brush.use_cursor_overlay: - row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') - else: - row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') + row.prop( + brush, + "use_cursor_overlay", + text="", + toggle=True, + icon='RESTRICT_VIEW_OFF' if brush.use_cursor_overlay else 'RESTRICT_VIEW_ON', + ) sub = row.row(align=True) sub.prop(brush, "cursor_overlay_alpha", text="Alpha") @@ -973,10 +976,13 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel): col.label(text="Texture:") row = col.row(align=True) if tex_slot.map_mode != 'STENCIL': - if brush.use_primary_overlay: - row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') - else: - row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') + row.prop( + brush, + "use_primary_overlay", + text="", + toggle=True, + icon='RESTRICT_VIEW_OFF' if brush.use_primary_overlay else 'RESTRICT_VIEW_ON', + ) sub = row.row(align=True) sub.prop(brush, "texture_overlay_alpha", text="Alpha") @@ -986,10 +992,13 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel): row = col.row(align=True) if tex_slot_mask.map_mode != 'STENCIL': - if brush.use_secondary_overlay: - row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') - else: - row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') + row.prop( + brush, + "use_secondary_overlay", + text="", + toggle=True, + icon='RESTRICT_VIEW_OFF' if brush.use_secondary_overlay else 'RESTRICT_VIEW_ON', + ) sub = row.row(align=True) sub.prop(brush, "mask_overlay_alpha", text="Alpha") |