diff options
author | Michael Soluyanov <crantisz> | 2020-03-23 18:00:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-23 18:35:29 +0300 |
commit | c95b522856c590e31278548ec02bbac1a64e217d (patch) | |
tree | 451ee4f970def4c34ca8cab6b4eb7081865491af /release/scripts/startup/bl_ui/space_userpref.py | |
parent | 88a86c025c0fb29b27b6caf7bd3873114e6e7c45 (diff) |
UI: Theme options for checkerboard pattern colors and size
This patch adds ability to set up colors and size of background
(transparency) checkerboard pattern in viewport and 2d editors. No new
backgrounds, only changing colors in existing ones.
This is not the background of the viewport, it is a transparency
checkerboard that is turned on only in render mode, when the
transparency mode is on. And also in 2D-editors, (image, sequencer,
etc).
Reviewed By: Pablo Vazquez, Julian Eisel
Differential Revision: https://developer.blender.org/D6791
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index afea9b8bdbf..e6ee779d89b 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -897,6 +897,23 @@ class USERPREF_PT_theme_interface_styles(ThemePanel, CenterAlignMixIn, Panel): flow.prop(ui, "widget_emboss") +class USERPREF_PT_theme_interface_transparent_checker(ThemePanel, CenterAlignMixIn, Panel): + bl_label = "Transparent Checkerboard" + bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "USERPREF_PT_theme_user_interface" + + def draw_centered(self, context, layout): + theme = context.preferences.themes[0] + ui = theme.user_interface + + flow = layout.grid_flow( + row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + + flow.prop(ui, "transparent_checker_primary") + flow.prop(ui, "transparent_checker_secondary") + flow.prop(ui, "transparent_checker_size") + + class USERPREF_PT_theme_interface_gizmos(ThemePanel, CenterAlignMixIn, Panel): bl_label = "Axis & Gizmo Colors" bl_options = {'DEFAULT_CLOSED'} @@ -2219,6 +2236,7 @@ classes = ( USERPREF_PT_theme_interface_state, USERPREF_PT_theme_interface_styles, USERPREF_PT_theme_interface_gizmos, + USERPREF_PT_theme_interface_transparent_checker, USERPREF_PT_theme_interface_icons, USERPREF_PT_theme_text_style, USERPREF_PT_theme_bone_color_sets, |