diff options
author | Pablo Vazquez <pablo@blender.org> | 2021-10-17 19:22:53 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2021-10-17 19:31:24 +0300 |
commit | 93544b641bd6687c9b0af3e203a4069977116a78 (patch) | |
tree | 8ca27d5e8f4a039ad4920c981b50cd61c885ef39 /source/blender/makesrna/intern/rna_userdef.c | |
parent | 19740b25c778ccd3fccd0ab33c7efd9f761dc001 (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/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index ccfc1222d4c..6d7bb9118b1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1560,6 +1560,13 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) prop, "Text Cursor", "Color of the interface widgets text insertion cursor (caret)"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "panel_roundness", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_ui_text( + prop, "Panel Roundness", "Roundness of the corners of panels and sub-panels"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 0.4f); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* Transparent Grid */ prop = RNA_def_property(srna, "transparent_checker_primary", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "transparent_checker_primary"); |