WIP: Fix #97049: Auto-keyframe Status Message Overlaps Navigation Gizmo #105565

Closed
Abhinav Chennubhotla wants to merge 2 commits from PhoenixFlame101/blender:97049-fix into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 17 additions and 2 deletions
Showing only changes of commit 5c822f77f4 - Show all commits

View File

@ -1445,14 +1445,29 @@ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *region)
const char *printable = IFACE_("Auto Keying On");
float printable_size[2];
int xco, yco;
int offset = 0;
const rcti *rect = ED_region_visible_rect(region);
const int font_id = BLF_default();
const int font_id = BLF_set_default();
BLF_width_and_height(
font_id, printable, BLF_DRAW_STR_DUMMY_MAX, &printable_size[0], &printable_size[1]);
xco = (rect->xmax - U.widget_unit) - (int)printable_size[0];
switch ((eUserpref_MiniAxisType)U.mini_axis_type) {
case USER_MINI_AXIS_TYPE_GIZMO:
offset = U.gizmo_size_navigate_v3d;
break;
case USER_MINI_AXIS_TYPE_MINIMAL:
offset = U.gizmo_size_navigate_v3d; // this part is wrong and should be changed
break;
case USER_MINI_AXIS_TYPE_NONE:
offset = 25;
break;
}
offset *= U.scale_factor;
xco = (rect->xmax - U.widget_unit) - (int)printable_size[0] - offset;
yco = (rect->ymax - U.widget_unit);
/* warning text (to clarify meaning of overlays)