Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Vazquez <pablo@blender.org>2021-10-17 19:22:53 +0300
committerPablo Vazquez <pablo@blender.org>2021-10-17 19:31:24 +0300
commit93544b641bd6687c9b0af3e203a4069977116a78 (patch)
tree8ca27d5e8f4a039ad4920c981b50cd61c885ef39 /source/blender/shader_fx
parent19740b25c778ccd3fccd0ab33c7efd9f761dc001 (diff)
UI: Visual style update to panels
Back in Blender 2.30, the GUI project brought panels into Blender among other important visual updates. For the first time it was possible to move the wall of buttons around. Providing a clear separation between sections (it even allowed the grouping of panels in tabs!) During the 2.5 redesign, the separation between panels became a line on top of each panel, and panels received theme settings for background and header colors. The default theme used the same color for both. In 2.8 the background color of panels was different from headers in the default theme, so the separator line was removed. While the separator line wasn't elegant (only on top, non-themeable, hard-coded emboss effect), it provided a sort of separation between panels. This patch solves the panels-separation by simply adding a margin space around them (not visible in default theme yet). Even though the margin reduces the width of the working area slightly, it makes room for the upcoming always-visible scrollbars. Other adjustments: * Use arrow icon instead of triangle to collapse/expand * Use rounded corners to match the rest of the UI (editor corners, nodes, etc). {F10953929, size=full} Margin on panels makes use of the `style->panelouter` property that hasn't been used in a while. Also slight tweaks to `boxspace` and `templatespace` style properties so they are multiples of 2 and operations on them round better. There is technically no need to update the themes for them to work, so no theme changes are included in this patch. {F10953931, size=full} {F10953933, size=full} {F10953934, size=full} {F10954003, size=full} ---- A new theme setting under Style controls the roundness of all panels (added it to Style instead of ThemeSpace because I think controlling the panel roundness per editor is a bit overkill): {F11091561, size=full, autoplay, loop} Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12814
Diffstat (limited to 'source/blender/shader_fx')
-rw-r--r--source/blender/shader_fx/intern/FX_ui_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/shader_fx/intern/FX_ui_common.c b/source/blender/shader_fx/intern/FX_ui_common.c
index 8cb1ea6b66c..86240171bf9 100644
--- a/source/blender/shader_fx/intern/FX_ui_common.c
+++ b/source/blender/shader_fx/intern/FX_ui_common.c
@@ -254,7 +254,7 @@ PanelType *shaderfx_panel_register(ARegionType *region_type, ShaderFxType type,
/* Give the panel the special flag that says it was built here and corresponds to a
* shader effect rather than a PanelType. */
- panel_type->flag = PANEL_TYPE_HEADER_EXPAND | PANEL_TYPE_DRAW_BOX | PANEL_TYPE_INSTANCED;
+ panel_type->flag = PANEL_TYPE_HEADER_EXPAND | PANEL_TYPE_INSTANCED;
panel_type->reorder = shaderfx_reorder;
panel_type->get_list_data_expand_flag = get_shaderfx_expand_flag;
panel_type->set_list_data_expand_flag = set_shaderfx_expand_flag;
@@ -287,7 +287,7 @@ PanelType *shaderfx_subpanel_register(ARegionType *region_type,
panel_type->draw_header = draw_header;
panel_type->draw = draw;
panel_type->poll = shaderfx_ui_poll;
- panel_type->flag = (PANEL_TYPE_DEFAULT_CLOSED | PANEL_TYPE_DRAW_BOX);
+ panel_type->flag = PANEL_TYPE_DEFAULT_CLOSED;
BLI_assert(parent != NULL);
BLI_strncpy(panel_type->parent_id, parent->idname, BKE_ST_MAXNAME);