WIP: Fix #97049: Auto-keyframe Status Message Overlaps Navigation Gizmo #105565
|
@ -1445,14 +1445,29 @@ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *region)
|
||||||
const char *printable = IFACE_("Auto Keying On");
|
const char *printable = IFACE_("Auto Keying On");
|
||||||
float printable_size[2];
|
float printable_size[2];
|
||||||
int xco, yco;
|
int xco, yco;
|
||||||
|
int offset = 0;
|
||||||
|
|
||||||
const rcti *rect = ED_region_visible_rect(region);
|
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(
|
BLF_width_and_height(
|
||||||
font_id, printable, BLF_DRAW_STR_DUMMY_MAX, &printable_size[0], &printable_size[1]);
|
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);
|
yco = (rect->ymax - U.widget_unit);
|
||||||
|
|
||||||
/* warning text (to clarify meaning of overlays)
|
/* warning text (to clarify meaning of overlays)
|
||||||
|
|
Loading…
Reference in New Issue