Page MenuHome

Outliner: Themeable Color Difference for Every Other Row
AbandonedPublic

Authored by D. N. (CandleComet) on May 15 2019, 12:10 AM.

Details

Summary

This patch adds the ability to theme the amount of color difference of every other row in the outliner. The option appears as a color with alpha in the outliner section of the theme settings. The color is lightly overlayed onto every other row in the outliner. Previously, every other row was hard-coded to be 6 values brighter than their adjecent rows. With this patch, users have more control over the difference in color. For example, a user could choose to remove the color difference between the rows (by making this option transparent) and have a solid background color in the outliner.

Diff Detail

Repository
rB Blender

Event Timeline

D. N. (CandleComet) retitled this revision from Outliner - Themeable Color for Every Other Row to Outliner - Themeable Color Difference for Every Other Row.May 15 2019, 12:16 AM
D. N. (CandleComet) edited the summary of this revision. (Show Details)
D. N. (CandleComet) retitled this revision from Outliner - Themeable Color Difference for Every Other Row to Outliner: Themeable Color Difference for Every Other Row.May 15 2019, 3:29 AM
D. N. (CandleComet) edited the summary of this revision. (Show Details)

Functionality wise is a +1. I'm usually against adding new theme settings (we have so many), but this one helps readability and even allows disabling the overlay altogether.

The only thing I'm not sure about is the name of the variable TH_ROW_OVERLAY, but I'll leave that to developers. What do you think @Brecht Van Lommel (brecht)?

This setting could even be introduced in the future for other editors with odd/even rows like the file browser.

source/blender/editors/interface/resources.c
798

Not sure about the name TH_ROW_OVERLAY, since it doesn't overlay all rows. Wouldn't it be more like variation? odd? interleaved?

TH_ROW_VARIATION
TH_ROW_ODD
TH_ROW_INTERLEAVE

Keeping in mind this could be used for the file browser as well.

This revision is now accepted and ready to land.May 15 2019, 2:45 PM

I would call it TH_ROW_ALTERNATING and set the UI text to Alternating Rows

Brecht Van Lommel (brecht) requested changes to this revision.May 15 2019, 4:22 PM

This is missing updates for existing preferences in versioning_userdef.c.

See D4650: For Discussion - Small Outliner Changes for an example of how to do that.

This revision now requires changes to proceed.May 15 2019, 4:22 PM

Renamed the variables to row_alternating and TH_ROW_ALTERNATING

Modified versioning_userdef.c to reflect the theme option

Thanks, committed rB68c12c80e501803f88b62f5f6f0f6a56bb53f303

Minor changes:

  • Don't scale alpha by 0.2 (adjust alpha in theme instead).
  • Use term alternate has same meaning and is shorter.
  • Bump version in BKE_blender_version.h.