From 93544b641bd6687c9b0af3e203a4069977116a78 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Sun, 17 Oct 2021 18:22:53 +0200 Subject: 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 --- source/blender/makesdna/DNA_userdef_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 291f6de5ba2..4a4d0ea2586 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -206,6 +206,10 @@ typedef struct ThemeUI { /** Intensity of the border icons. >0 will render an border around themed * icons. */ float icon_border_intensity; + + float panel_roundness; + char _pad2[4]; + } ThemeUI; /* try to put them all in one, if needed a special struct can be created as well -- cgit v1.2.3