From 0cb264a282626d1f363d1898695f44285e1e0027 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Jan 2021 18:31:11 +1100 Subject: 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. --- source/blender/editors/space_file/file_draw.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_file/file_draw.c') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 8e9093151ba..a12c9633798 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -131,7 +131,15 @@ static void draw_tile(int sx, int sy, int width, int height, int colorid, int sh UI_GetThemeColorShade4fv(colorid, shade, color); UI_draw_roundbox_corner_set(UI_CNR_ALL); UI_draw_roundbox_aa( - true, (float)sx, (float)(sy - height), (float)(sx + width), (float)sy, 5.0f, color); + &(const rctf){ + .xmin = (float)sx, + .xmax = (float)(sx + width), + .ymin = (float)(sy - height), + .ymax = (float)sy, + }, + true, + 5.0f, + color); } static void file_draw_icon(uiBlock *block, -- cgit v1.2.3