Page MenuHome

UI: File Browser Custom Folder Color
ClosedPublic

Authored by Harley Acheson (harley) on Sat, Sep 7, 12:24 AM.

Details

Summary

This patches adds a user theme setting to change the color of the folder icons. This helps to differentiate the folders from files in lists. There is a nice manila default that can be easily changed. If a light color then any overlaid type icons will be dark, but will reverse if a dark color is chosen.

A sample showing how it looks in thumbnail view (small size) after the patch is applied:

Diff Detail

Repository
rB Blender

Event Timeline

Tested. Seems to work with no issues.

This helps folders stand out, and you can theme them for different theme colors so they are always contrasting.

This revision is now accepted and ready to land.Sat, Sep 7, 9:16 AM

Code wise, this should be fine. Also +1 on the idea.
Of course I'm always very wary of adding new theme colors, but I've kinda resigned for the lack of a short term solution.

Just to graphical things:

  • I'm not sure if I like the color too much. It does still seem a bit too saturated and/or a tad too brownish. Just to be sure: You didn't just test this with a color managed display, or did you?
  • Do we really want to color folder icons in the sidebar (e.g. Recents)? That does seem a bit distracting, focus shouldn't be pulled from the main region. Also, we don't need to differentiate between folders and other files there. (Can easily be disabled in UI_GetIconThemeColor4ubv())
source/blender/editors/interface/resources.c
1399

Would update comment to say "Only colored icons in specific places, overall UI...".

source/blender/makesrna/intern/rna_userdef.c
1510

Would prefer having a description here saying that this is for folder icons in the file browser.

@Julian Eisel (Severin)

I'm not sure if I like the color too much. It does still seem a bit too saturated and/or a tad too brownish. Just to be sure: You didn't just test this with a color managed display, or did you?

If you have some color you prefer to be the default folder color just supply an RGB and I will put it in there.

Do we really want to color folder icons in the sidebar...

When they weren't colored they looked grey and therefore a bit.. disabled. But no worries, will make it so only the main region gets the color. Can always change later.

And thanks for the review, will update the patch with your changes shortly.

Adding Bastien as reviewer, since he's module owner and should get a chance to veto. We should really do that for any file browser related patch.

In this case changes are just for the visuals though, which he's probably not too worried about :)

Updated with current master.

Addressed both issues raised by Julian Eisel (Severin): a change of comment in resources.c and added tooltip text for folder color property.

Have also turned off the coloring of folders outside of the main area as this is general consensus of the UI Team. So not in the "Recents" list for example.

LGTM. We can tweak the theme color at any point.
Let's just wait two days at least so Bastien has some chance to chime in.

source/blender/makesrna/intern/rna_userdef.c
1510

Color of the file folder images in the File Browse. -> Color of folders in the file browser

Besides RNA tip already noted by @Brecht Van Lommel (brecht), patch LGTM.

Updated to current master and to fix a tooltip as suggested by @Brecht Van Lommel (brecht)

This revision was automatically updated to reflect the committed changes.