Page MenuHome

UI: Dialog Alert and Info Editor Icon Colors
Needs ReviewPublic

Authored by Harley Acheson (harley) on Sat, Mar 21, 2:57 AM.

Details

Summary

We now have large "alert"-type icons that we can use in dialogs. We also have smaller versions that we use elsewhere, like in the Info Editor to indicate the type of report. These icons have the same designs and it is best that they share the same colors within any single theme.

This patch reconciles these icons colors. The large and small versions of these icons take their colors from the same theme settings. The default colors, for the "dark theme" were chosen by members of the UI team and look like the following when used in dialogs:

In order for the same colors to be using in the Info Editor I have had to remove the background that was printed behind each icon. Not only does this make them more consistent but it brings back the option to have (if desired) differing text color per report type. By default though it uses the same color for each. This is what it looks like showing various types of reports:

Diff Detail

Repository
rB Blender

Event Timeline

This revision is now accepted and ready to land.Sat, Mar 21, 8:06 AM

I don't think there's a need for a separate color for the Question. What does this blue mean? Yellow and red (warning, error) to attract attention, is it common, but blue? Just use the same color as for Info icon.

Indeed, the question color may not be necessary.

I don't think there's a need for a separate color for the Question. What does this blue mean? Yellow and red (warning, error) to attract attention, is it common, but blue? Just use the same color as for Info icon.

Good point. And I agree, but there are two different things you could mean or ways to do this...

If you look at this patch I’ve had to actually make a new theme color in Info for it, even though not needed in there, because the rest are defined there. Should I leave that as is in the patch but change that color to be the same as the Info Icon? That would leave everything looking as you want and let theme designers choose whatever they want in a logical way.

Or should I remove that new theme color? Then the Question icon could use text color. But then it would seem confusing that Icon and Question start off as similar colours yet are recoloured differently. Both icons could use text color of course, but the Info theme color already exists and I’m trying to treat these as a group.

I meant, remove info_question and use info_info for both Question icon and Info icon.
Info and Question are very similar, and besides, the Question is not being used anywhere yet.

@Yevgeny Makarov (jenkm) - ...remove info_question and use info_info for both Question icon and Info icon.

Ah. Yes, that does sound quite reasonable.

Harley Acheson (harley) edited the summary of this revision. (Show Details)Sun, Mar 22, 7:02 PM

As discussed, changing the "Question" color to be the same as "Info". Have updated the sample images in the original post.

Julian Eisel (Severin) requested changes to this revision.Wed, Mar 25, 10:34 PM

Note that reports banners also use the same colors for the background, e.g.:

Looks quite off to me.

source/blender/editors/space_info/info_draw.c
67–68

Is this an intentional change? Looks like it should use TH_INFO_SELECTED to me.

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

No need to have the word "Color" in the name, that should be clear from context. (It should be removed from info_selected_text as well, but that's a different issue.)

This revision now requires changes to proceed.Wed, Mar 25, 10:34 PM
Harley Acheson (harley) planned changes to this revision.Fri, Mar 27, 2:46 AM

Note that reports banners also use the same colors for the background, e.g.:

Looks quite off to me.

Indeed. Thanks for noticing that. I hadn't actually looked for, or at, that code that makes those.

Updated based on review from @Julian Eisel (Severin).

This patch now also reconciles the colors used in the report banners as well.

Is this an intentional change? Looks like it should use TH_INFO_SELECTED to me.

Yes, when the line item is selected (blue background in default theme) both the text and the icon are drawn with TH_INFO_SELECTED. Otherwise there can be horrible interplay between the icon color and that selected line color. In fact the theme designer could even do things like completely reversing the colors when selected so using dark text on a light background - this solution works in all cases. Otherwise we'd need something like a "selected icon color".

Fixing a mismatch between function definitions and declarations.