Page MenuHome

Refactor: Separate scrollers from text drawing in API
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Apr 26 2019, 4:54 PM.

Details

Summary

This is a continuation of D4681, where I separated the
e.g. frame number drawing from scrollers internally.
This patch changes the API, so that space draw handlers
have to draw these numbers explicitely.

This greatly simplifies the scrollers API for all spaces
that just need scrollers without any frame numbers.

Individual refactoring commits:

  • temporary utility parameters to disable number drawing in scroller
  • new number drawing in space_action
  • move all view2d number drawing out of scrollers
  • remove previously created temporary function
  • remove unused context parameter from scroller draw function
  • scrollers don't need grid and unit information anymore
  • use scrollbar area from view2d
  • bring back scale indicators in clip graph editor
  • bring back frame numbers in clip dopesheet
  • remove invalidated comment
  • improved alignment

This refactoring is necessary for D4654.

A next refactoring step could be to splitup View2DGrid, because
e.g. the grid in the node editor is conceptually very different
from the grid in the timeline.
Trying to squeeze everything through the same functions,
complicates the code quite a bit.

Diff Detail

Repository
rB Blender
Branch
refactor-view2d-numbers (branched from master)
Build Status
Buildable 3440
Build 3440: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 30 2019, 1:47 AM
This revision was automatically updated to reflect the committed changes.