UI: Theme refresh for Blender v3.0

{F11548100, size=full}

To celebrate the beginning of a new series, it feels like the right time to
give the theme a fresh look while improving on what already works.

The aim of this refresh is to keep a familiar look but with polishing touches
here and there. Like new paint on the walls of your well known house.

The theme for Blender 2.8 was well received but presented a few flaws.

* Transparency on menus and tooltips reduce readability
* Mismatch on certain colors, especially outlines of connected widgets
* Active/open menus highlight was not prominent enough
* Header background mismatch in some editors

At the same time we can make use of new features in 3.0:

* Make panels look like panels again (like in v2.3!)
* Make use of roundness in more widgets
* Since nodes are no longer hard-coded to be transparent, tweak opacity and saturation
* Tweak colors for the new dot grid

This update does not include:

* Meshes in edit mode to match greenish object-data color. This needs tweaks in the code to improve contrast.
* A copy of the Blender 2.8x legacy theme. This could be added to the community themes (shouldn't cost much maintenance, I hope)

There will be certainly small tweaks to do here and there, I've been working using this theme
for months but there can be areas that are missing update. The overall style is presented here.

This commit bumps the file subversion.

Reviewed By: #user_interface, Severin

Differential Revision: https://developer.blender.org/D13008
This commit is contained in:
Pablo Vazquez 2021-10-27 18:20:40 +02:00
parent 71adad288b
commit bfec984cf8
Notes: blender-bot 2023-02-14 06:17:17 +01:00
Referenced by issue #92790, Dark vignetting in 3D viewport window (3.0.0 beta)
Referenced by issue #92771, Different hierarchy icon between properties editor and geonodes editor
Referenced by issue #92595, Curve widget vertex selection difficult to see with theme in 3.0
6 changed files with 467 additions and 438 deletions

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 39
#define BLENDER_FILE_SUBVERSION 40
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and show a warning if the file

View File

@ -2080,17 +2080,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
/**
* Versioning code until next subversion bump goes here.
*
* \note Be sure to check when bumping the version:
* - "versioning_userdef.c", #blo_do_versions_userdef
* - "versioning_userdef.c", #do_versions_theme
*
* \note Keep this message at the bottom of the function.
*/
{
if (!MAIN_VERSION_ATLEAST(bmain, 300, 40)) {
/* Update the `idnames` for renamed geometry and function nodes. */
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
if (ntree->type != NTREE_GEOMETRY) {
@ -2100,7 +2090,6 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
version_geometry_nodes_set_position_node_offset(ntree);
version_node_id(ntree, GEO_NODE_LEGACY_VOLUME_TO_MESH, "GeometryNodeLegacyVolumeToMesh");
}
/* Keep this block, even when empty. */
/* Add storage to viewer node. */
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
@ -2154,4 +2143,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
/**
* Versioning code until next subversion bump goes here.
*
* \note Be sure to check when bumping the version:
* - "versioning_userdef.c", #blo_do_versions_userdef
* - "versioning_userdef.c", #do_versions_theme
*
* \note Keep this message at the bottom of the function.
*/
{
/* Keep this block, even when empty. */
}
}

View File

@ -58,10 +58,6 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
{
#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST(userdef, ver, subver)
if (!USER_VERSION_ATLEAST(280, 20)) {
memcpy(btheme, &U_theme_default, sizeof(*btheme));
}
#define FROM_DEFAULT_V4_UCHAR(member) copy_v4_v4_uchar(btheme->member, U_theme_default.member)
if (!USER_VERSION_ATLEAST(280, 25)) {
@ -317,6 +313,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
btheme->space_node.grid_levels = 7;
}
if (!USER_VERSION_ATLEAST(300, 40)) {
memcpy(btheme, &U_theme_default, sizeof(*btheme));
}
/**
* Versioning code until next subversion bump goes here.
*
@ -936,6 +936,14 @@ void blo_do_versions_userdef(UserDef *userdef)
}
}
if (!USER_VERSION_ATLEAST(300, 40)) {
LISTBASE_FOREACH (uiStyle *, style, &userdef->uistyles) {
const int default_title_points = 11; /* UI_DEFAULT_TITLE_POINTS */
style->paneltitle.points = default_title_points;
style->grouplabel.points = default_title_points;
}
}
/**
* Versioning code until next subversion bump goes here.
*

View File

@ -247,7 +247,7 @@ enum {
#define UI_DEFAULT_TEXT_POINTS 11
/* Larger size used for title text. */
#define UI_DEFAULT_TITLE_POINTS 12
#define UI_DEFAULT_TITLE_POINTS 11
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160

View File

@ -252,10 +252,11 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case TH_HEADER_ACTIVE:
cp = ts->header;
const int factor = 5;
/* Lighten the header color when editor is active. */
header_active[0] = cp[0] > 245 ? cp[0] - 10 : cp[0] + 10;
header_active[1] = cp[1] > 245 ? cp[1] - 10 : cp[1] + 10;
header_active[2] = cp[2] > 245 ? cp[2] - 10 : cp[2] + 10;
header_active[0] = cp[0] > 245 ? cp[0] - factor : cp[0] + factor;
header_active[1] = cp[1] > 245 ? cp[1] - factor : cp[1] + factor;
header_active[2] = cp[2] > 245 ? cp[2] - factor : cp[2] + factor;
header_active[3] = cp[3];
cp = header_active;
break;