Fix T62636: Overlapping scrollbar in driver editor

Instead of only `ymin` and `ymax`, `ANIM_channel_draw_widgets`
has a rectangle as input now.
This allows the caller to set a custom width for the channel.

Some space types need the extra space for the scrollbar
(drivers, graph), but the other don't have a scrollbar.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4543
This commit is contained in:
2019-03-18 17:28:36 +01:00
parent 8fb0b9aebb
commit ad3d925682
5 changed files with 48 additions and 33 deletions

View File

@@ -548,7 +548,13 @@ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level);
/* Draw the given channel */
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index);
/* Draw the widgets for the given channel */
void ANIM_channel_draw_widgets(const struct bContext *C, bAnimContext *ac, bAnimListElem *ale, struct uiBlock *block, float yminc, float ymaxc, size_t channel_index);
void ANIM_channel_draw_widgets(
const struct bContext *C,
bAnimContext *ac,
bAnimListElem *ale,
struct uiBlock *block,
rctf *rect,
size_t channel_index);
/* ------------------------ Editing API -------------------------- */