From dc2b562ace25e77907c12c7a68bdc680bcf9a7e9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 10 Jul 2019 12:40:18 +0200 Subject: Splash: use red heart icon for development fund Now that the development fund image will disappear from the splash, this draws a little more attention to this link. --- source/blender/editors/include/UI_icons.h | 6 +++++- source/blender/editors/include/UI_resources.h | 1 + source/blender/editors/interface/interface_icons.c | 1 + source/blender/editors/interface/resources.c | 20 ++++++++++++++------ 4 files changed, 21 insertions(+), 7 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 3d2052f1fa9..47cf827ed66 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -45,6 +45,9 @@ #ifndef DEF_ICON_COLOR # define DEF_ICON_COLOR DEF_ICON #endif +#ifndef DEF_ICON_FUND +# define DEF_ICON_FUND DEF_ICON +#endif /* ICON_ prefix added */ DEF_ICON_COLOR(NONE) @@ -289,7 +292,7 @@ DEF_ICON(DECORATE_LIBRARY_OVERRIDE) DEF_ICON(DECORATE_UNLOCKED) DEF_ICON(DECORATE_LOCKED) DEF_ICON(DECORATE_OVERRIDE) -DEF_ICON_BLANK(111) +DEF_ICON_FUND(FUND) DEF_ICON(TRACKER_DATA) DEF_ICON(HEART) DEF_ICON(ORPHAN_DATA) @@ -1033,4 +1036,5 @@ DEF_ICON_COLOR(EVENT_RETURN) #undef DEF_ICON_SHADING #undef DEF_ICON_VECTOR #undef DEF_ICON_COLOR +#undef DEF_ICON_FUND #undef DEF_ICON_BLANK diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index db6bb35560d..3b080b6df95 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -272,6 +272,7 @@ typedef enum ThemeColorID { TH_ICON_OBJECT_DATA, TH_ICON_MODIFIER, TH_ICON_SHADING, + TH_ICON_FUND, TH_SCROLL_TEXT, diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 59889e74230..ea5ef94d90d 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -169,6 +169,7 @@ static const IconType icontypes[] = { # define DEF_ICON_OBJECT_DATA(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_OBJECT_DATA}, # define DEF_ICON_MODIFIER(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_MODIFIER}, # define DEF_ICON_SHADING(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_SHADING}, +# define DEF_ICON_FUND(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_FUND}, # define DEF_ICON_VECTOR(name) {ICON_TYPE_VECTOR, 0}, # define DEF_ICON_COLOR(name) {ICON_TYPE_COLOR_TEXTURE, 0}, # define DEF_ICON_BLANK(name) {ICON_TYPE_BLANK, 0}, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index e281c6c9e9c..25116934b06 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -901,6 +901,12 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_ICON_SHADING: cp = btheme->tui.icon_shading; break; + case TH_ICON_FUND: { + /* Development fund icon color is not part of theme. */ + static const char red[4] = {204, 48, 72, 255}; + cp = red; + break; + } case TH_SCROLL_TEXT: cp = btheme->tui.wcol_scroll.text; @@ -1377,12 +1383,14 @@ bool UI_GetIconThemeColor4ubv(int colorid, uchar col[4]) if (colorid == 0) { return false; } - - /* Only colored icons in outliner and popups, overall UI is intended - * to stay monochrome and out of the way except a few places where it - * is important to communicate different data types. */ - if (!((theme_spacetype == SPACE_OUTLINER && theme_regionid == RGN_TYPE_WINDOW) || - (theme_spacetype == SPACE_PROPERTIES && theme_regionid == RGN_TYPE_NAV_BAR))) { + else if (colorid == TH_ICON_FUND) { + /* Always color development fund icon. */ + } + else if (!((theme_spacetype == SPACE_OUTLINER && theme_regionid == RGN_TYPE_WINDOW) || + (theme_spacetype == SPACE_PROPERTIES && theme_regionid == RGN_TYPE_NAV_BAR))) { + /* Only colored icons in outliner and popups, overall UI is intended + * to stay monochrome and out of the way except a few places where it + * is important to communicate different data types. */ return false; } -- cgit v1.2.3