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/blenkernel/BKE_screen.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_screen.h') diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 6f341a12b82..5c913ed851f 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -301,8 +301,6 @@ enum { PANEL_TYPE_LAYOUT_VERT_BAR = (1 << 3), /** This panel type represents data external to the UI. */ PANEL_TYPE_INSTANCED = (1 << 4), - /** Draw panel like a box widget. */ - PANEL_TYPE_DRAW_BOX = (1 << 6), /** Don't search panels with this type during property search. */ PANEL_TYPE_NO_SEARCH = (1 << 7), }; -- cgit v1.2.3