Page MenuHome

Allow themes to control report background
AbandonedPublic

Authored by Kitt Zwovic (gandalf3) on Oct 9 2014, 12:10 AM.

Details

Summary

Themes cannot control the background of the report notifications in the info header, often resulting in problems like this one:

The outline and shading of the report can be controlled via the options in themes > user interface > box, however these give very limited control.
Even some of the bundled official themes have rather odd looking reports because of this, for instance Back to Black:

This patch doesn't add new controls to the theme options, but instead sets the report background color based on the inner color of the box section, and the part of the backgound under the icon is controlled by the item color of the box section.

The only problem with this that any changes to the report colors will also affect the box UI elements. If this is too awkward, then it may be better to add a new separate theme option for reports. (not sure about this, feedback much appreciated of course ;)

This patch also makes the color that the report briefly flashes themeable using the existing theme controls for highlighting lines in the info window.
The idea is to make the highlighted line colors consistent with the report colors. The current line selection color in the info window (blue) could conflict with this, so I propose that it be changed to orange to stay more consistent with other parts of blender.
These changes are not in the patch (yet).

Diff Detail

Event Timeline

Kitt Zwovic (gandalf3) retitled this revision from to Allow themes to control report background.
Kitt Zwovic (gandalf3) updated this object.
Campbell Barton (campbellbarton) requested changes to this revision.Oct 23 2014, 12:15 PM
Campbell Barton (campbellbarton) edited edge metadata.

Rather not add more theme options, just make the color calculation ensure that the color selected is closer to the header background.

Use existing region theme background as a reference for greyscale +15% lightness (for example).

This revision now requires changes to proceed.Oct 23 2014, 12:15 PM

Is there anything really wrong with the current approach? (it does not add more settings, not sure if that was clear before..)

@Aaron Carlisle (Blendify) I believe the issue is that themes with dark text require light backgrounds, while themes with light text require dark backgrounds.
Currently the background color is hardcoded to a light-ish gray. I've seen one or two complaints about this (and not without good reason imo).

The options I can think of are:

  • Add a new theme option to control the report background
    • Adds another theme option
    • Allows complete control (themes can color/tint the background as they desire)
  • Use an existing theme color
    • Does not add more theme options
    • limits themeability by tying mostly-unrelated UI colors together (the patch currently uses the background color from box elements, as the only way to affect the report background at this time is by using the box shading settings)
  • Mutate an existing color (such as info space header) to be lighter/darker
    • Risks not solving the problem on edge-case themes
    • To work correctly in most cases, some logic would have to decide whether to brighten or darken the header color. Lighten if the text color is dark, darken if the text color is light.

To avoid adding more theme options, this patch currently implements option two. I'd personally prefer option one, as I'm not aware of what significant downsides there are with adding a theme option to the "info" section.

This has been re-opened as D3153 which takes a better approach. Closing.