diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-25 10:31:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-25 10:34:29 +0300 |
commit | 0cb264a282626d1f363d1898695f44285e1e0027 (patch) | |
tree | f35b894c87fd338e71584b5b21d84337e0a73c19 /source/blender/editors/space_sequencer | |
parent | 17ac860cefe66cbb2abae3448d4a949a6fccc520 (diff) |
Cleanup: pass 'rctf' rectangle to 2D box drawing functions
Passing 4x arguments for the rectangle,
mixed in with round-box radius & color wasn't very readable.
Instead, pass a `rctf` as the first argument to UI box drawing functions.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 72c3e43185b..201df1ceed6 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1447,15 +1447,24 @@ static void sequencer_draw_borders_overlay(const SpaceSeq *sseq, if (sseq->flag & SEQ_SHOW_SAFE_MARGINS) { immUniformThemeColorBlend(TH_VIEW_OVERLAY, TH_BACK, 0.25f); - UI_draw_safe_areas( - shdr_pos, x1, x2, y1, y2, scene->safe_areas.title, scene->safe_areas.action); + UI_draw_safe_areas(shdr_pos, + &(const rctf){ + .xmin = x1, + .xmax = x2, + .ymin = y1, + .ymax = y2, + }, + scene->safe_areas.title, + scene->safe_areas.action); if (sseq->flag & SEQ_SHOW_SAFE_CENTER) { UI_draw_safe_areas(shdr_pos, - x1, - x2, - y1, - y2, + &(const rctf){ + .xmin = x1, + .xmax = x2, + .ymin = y1, + .ymax = y2, + }, scene->safe_areas.title_center, scene->safe_areas.action_center); } |