Page MenuHome

UI: Info Editor Changes
Needs ReviewPublic

Authored by Harley Acheson (harley) on Dec 29 2019, 3:16 AM.
"Love" token, awarded by symstract."100" token, awarded by Frozen_Death_Knight."Like" token, awarded by Regnas."Love" token, awarded by Lumpengnom."Love" token, awarded by RodDavis."Love" token, awarded by andruxa696."Doubloon" token, awarded by madminstrel."Love" token, awarded by mywa880."Love" token, awarded by HooglyBoogly."Love" token, awarded by hlorus."Love" token, awarded by jenkm."Love" token, awarded by bblanimation."Love" token, awarded by amonpaike."Love" token, awarded by Tetone."Love" token, awarded by jc4d."Love" token, awarded by monio."Love" token, awarded by EitanSomething.



The Info Editor shows the log of operations, warnings and error messages. But its quite plain and hard to read quickly as it looks like a wall of text. It is difficult to tell where one entry starts and the next one begins:

This patch makes it look like the following instead:

It doesn't do much but make it prettier. Nicer margins, line height, padding, and new icons to indicate the type of entry.

I've tried to keep all changes as simple as possible, but the drawing code is shared between Info and Console so this is mostly about adding optional features that could be turned on in one versus the other.

There is no real changes to Console here, but there are some code changes because of how they share TextView. The Console code just gets a bit simpler and gains a new callback to properly draw its text input caret, rather than do so when getting line colors.

The changes are mostly in TextView for the new optional behaviors and to the Info editor itself.

Diff Detail

rB Blender

Event Timeline

Console text insertion caret was drawing a bit too low.

Just increasing the patch context size.

Just some small tweaks, and rounding off the corners of the icon backgrounds:

When drawing icon background being explicit with the opacity.

This makes the Info Editor a lot easier to read.

The different entries are now possible to tell apart, and we can also tell apart the *type* of notification with the various indicator types.

This revision is now accepted and ready to land.Sun, Dec 29, 10:04 PM

Just some cleanup. Trying to make it a bit easier to review.

Julian Eisel (Severin) requested changes to this revision.Thu, Jan 23, 4:28 PM

As often, mostly fine, although I found one bug. The rest is mostly about style or naming.
So this is close to being ready I think.

The icon background colors seem a bit strong and I find the look off. Of course this is highly arguable, but I'd suggest something "fresher" or more "flat". E.g. current patch vs. adjusted colors (green #3ACE87, red #FF613D, according to the Blender color picker):

We could also allow setting alpha in the roundbox background colors as a way to remove the roundboxes.




Does this have any impact? Are fonts still 14 pixel high?


"Section" is a bit ambiguous. Could use line_ instead?


Style: With so much text crammed together things become a bit hard to read and focus on. In such blocks with more than ~3 lines I like to keep variable declarations on top, then an empty line as separator and then the rest.
This also counts for the other if-blocks you modified above and below, would be nice to clean that up.


I think selection highlighting in the console is missing this offset, the last character isn't being highlighted right now.


While at it: Could you turn this into an enum?


The names of these new properties didn't make much sense to me. Not even with the UI name. I had to actually open Blender and try changing them.

E.g. what does an info_property theme color refer to? I'd suggest info_property_icon_back or similar. UI text could be "Property Icon Background". A description would also be appreciated.


If the RNA property has the same name as the DNA name, you don't need the RNA_def_property_xxx_sdna() call.

This revision now requires changes to proceed.Thu, Jan 23, 4:28 PM

@Julian Eisel (Severin) agreed re the color thing, which is why my Info Editor theme patch adjusted exactly those details. So, probably those things should not be a blocker here :)

Harley Acheson (harley) updated this revision to Diff 21109.EditedFri, Jan 24, 5:29 AM

Updated to incorporate the changes requested and suggested by @Julian Eisel (Severin)

Fixed a bug found by Julian to do with text selection. It had been on my "to do" list but I had forgot the "do" part. LOL.

Other changes:

  • Color tweaks as suggested
  • Can use alpha for icon bg colors to remove them if desired
  • Set one function argument as UNUSED
  • Variables using "section" names now using "line" names
  • White-space breaks added for better readability
  • Flag defines turned into an enum
  • Better UI names for theme colors
  • Added Descriptions to theme colors
  • Unneeded RNA_defef_property_xxx_sdna() calls removed

Although the theme colors now have better UI names and Descriptions I left the identifiers to follow the style of the existing ones. Didn't want to rename any existing members, and it is possible that their uses could change again one day.

Now looking for a customer service desk where I can cash in these tokens. LOL