diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/screen/area_utils.c | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/editors/screen/area_utils.c')
-rw-r--r-- | source/blender/editors/screen/area_utils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/screen/area_utils.c b/source/blender/editors/screen/area_utils.c index 12de1ddb795..003ba46be4f 100644 --- a/source/blender/editors/screen/area_utils.c +++ b/source/blender/editors/screen/area_utils.c @@ -47,12 +47,12 @@ void ED_region_generic_tools_region_message_subscribe(const struct bContext *UNU struct Scene *UNUSED(scene), struct bScreen *UNUSED(screen), struct ScrArea *UNUSED(sa), - struct ARegion *ar, + struct ARegion *region, struct wmMsgBus *mbus) { wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { - .owner = ar, - .user_data = ar, + .owner = region, + .user_data = region, .notify = ED_region_do_msg_notify_tag_redraw, }; WM_msg_subscribe_rna_anon_prop(mbus, WorkSpace, tools, &msg_sub_value_region_tag_redraw); @@ -61,11 +61,12 @@ void ED_region_generic_tools_region_message_subscribe(const struct bContext *UNU /** * Callback for #ARegionType.snap_size */ -int ED_region_generic_tools_region_snap_size(const ARegion *ar, int size, int axis) +int ED_region_generic_tools_region_snap_size(const ARegion *region, int size, int axis) { if (axis == 0) { /* Using Y axis avoids slight feedback loop when adjusting X. */ - const float aspect = BLI_rctf_size_y(&ar->v2d.cur) / (BLI_rcti_size_y(&ar->v2d.mask) + 1); + const float aspect = BLI_rctf_size_y(®ion->v2d.cur) / + (BLI_rcti_size_y(®ion->v2d.mask) + 1); const float icon_size = ICON_DEFAULT_HEIGHT_TOOLBAR / aspect; const float column = 1.25f * icon_size; const float margin = 0.5f * icon_size; |