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-27 19:20:40 +0300
committerPablo Vazquez <pablo@blender.org>2021-10-27 19:29:18 +0300
commitbfec984cf82a64a74ee86a902348a46e3c231b8f (patch)
tree748cac6b304b4843a4712a8d324767bc4887c554 /source/blender
parent71adad288b02ae98608693d728843b5917f336e6 (diff)
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
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_blender_version.h2
-rw-r--r--source/blender/blenloader/intern/versioning_300.c26
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c16
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/interface/resources.c7
5 files changed, 32 insertions, 21 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index d39dc8bc406..e5b63e7286b 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -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
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 9bd6280dbf4..68faa4c0672 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -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. */
+ }
}
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index df59cd3afa9..4234570af6c 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -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.
*
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 0f290d4255b..39d70f15a3a 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -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
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index ad7c6332ee9..aece2e58f1e 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -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;