Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-01-25 10:31:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-25 10:34:29 +0300
commit0cb264a282626d1f363d1898695f44285e1e0027 (patch)
treef35b894c87fd338e71584b5b21d84337e0a73c19 /source/blender/editors/space_info
parent17ac860cefe66cbb2abae3448d4a949a6fccc520 (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_info')
-rw-r--r--source/blender/editors/space_info/textview.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index a489216afd1..ef5d9c0aab0 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -225,13 +225,16 @@ static bool textview_draw_string(TextViewDrawState *tds,
rgba_uchar_to_float(col, icon_bg);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
- UI_draw_roundbox_aa(true,
- hpadding,
- line_top - bg_size - vpadding,
- bg_size + hpadding,
- line_top - vpadding,
- 4 * UI_DPI_FAC,
- col);
+ UI_draw_roundbox_aa(
+ &(const rctf){
+ .xmin = hpadding,
+ .xmax = bg_size + hpadding,
+ .ymin = line_top - bg_size - vpadding,
+ .ymax = line_top - vpadding,
+ },
+ true,
+ 4 * UI_DPI_FAC,
+ col);
}
if (icon) {