diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2019-09-10 18:07:39 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2019-09-10 18:07:39 +0300 |
commit | 8f55794c0e803ec5454febe2e45651c721f62c8f (patch) | |
tree | d72ee691ad669096d7f86e498560631cccadb515 /source/blender/editors/interface | |
parent | a3e7440cfdd2f307e5c57922fd22e8770f0b8390 (diff) |
UI: File Browser Custom Folder Color
Allows file browser folders to be shown in a theme-selectable color, default of manila.
Differential Revision: https://developer.blender.org/D5713
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 7ada4755a64..085ae5bdb93 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_FOLDER(name) {ICON_TYPE_MONO_TEXTURE, TH_ICON_FOLDER}, # 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}, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 7c5d5401d08..ae161f1017c 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -905,6 +905,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_ICON_SHADING: cp = btheme->tui.icon_shading; break; + case TH_ICON_FOLDER: + cp = btheme->tui.icon_folder; + break; case TH_ICON_FUND: { /* Development fund icon color is not part of theme. */ static const uchar red[4] = {204, 48, 72, 255}; @@ -1391,8 +1394,9 @@ bool UI_GetIconThemeColor4ubv(int colorid, uchar col[4]) /* 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 + (theme_spacetype == SPACE_PROPERTIES && theme_regionid == RGN_TYPE_NAV_BAR) || + (theme_spacetype == SPACE_FILE && theme_regionid == RGN_TYPE_WINDOW))) { + /* Only colored icons in specific places, 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; |