Page MenuHome

Fix T77116: UI: Draw Current Frame Indicator Text with Theme Color
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jun 1 2020, 7:48 PM.

Diff Detail

Repository
rB Blender
Branch
current-frame-text-color (branched from master)
Build Status
Buildable 8315
Build 8315: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jun 1 2020, 7:48 PM
Hans Goudey (HooglyBoogly) created this revision.
Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)

Hey @Hans Goudey (HooglyBoogly) ! Note that I haven't looked into this much so these comments could be dumb. LOL.

You might consider using TH_HEADER_TEXT_HI for this instead of TH_TEXT_HI. The former is hardly ever used for anything. But the latter is used for a few things in that area. For example ANIM_channel_draw() uses that for selected channel text. marker_color_get() using it as well. Probably a few others as I didn't look too far. When there is overlap it could limit some design choices. Like you might want a red number but not want red for selected text elsewhere.

Another comment is more a curiosity. You are changing draw_current_frame() which looks to be the exact place if remember right. But there is also a very similar looking ANIM_draw_cfra_number() in editors\animation\anim_draw.c that has notes that it is for drawing current frame number too. I think it is deprecated code that is not called anywhere. I think this other one might have been forgotten when some of these animation and timeline editors were amalgamated.

You might consider using TH_HEADER_TEXT_HI for this instead of TH_TEXT_HI. The former is hardly ever used for anything. But the latter is used for a few things in that area. For example ANIM_channel_draw() uses that for selected channel text. marker_color_get() using it as well. Probably a few others as I didn't look too far. When there is overlap it could limit some design choices. Like you might want a red number but not want red for selected text elsewhere.

That makes sense, I'll try using that. I agree that the "current frame indicator" is probably a special case.

Another comment is more a curiosity. You are changing draw_current_frame() which looks to be the exact place if remember right. But there is also a very similar looking ANIM_draw_cfra_number() in editors\animation\anim_draw.c that has notes that it is for drawing current frame number too. I think it is deprecated code that is not called anywhere. I think this other one might have been forgotten when some of these animation and timeline editors were amalgamated.

Haha, I noticed that too and made a patch to remove that code, it's totally dead (D7898).

  • Merge branch 'master' into current-frame-text-color
  • Use Header Text Highlight
This revision is now accepted and ready to land.Jun 15 2020, 2:30 PM