diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index b4fe2f85b72..c7087b28783 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -740,6 +740,10 @@ struct wmDropBox *WM_dropbox_add( void (*copy)(struct wmDrag *, struct wmDropBox *), void (*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *), WMDropboxTooltipFunc tooltip); +void WM_drag_draw_item_name_fn(struct bContext *C, + struct wmWindow *win, + struct wmDrag *drag, + const int xy[2]); void WM_drag_draw_default_fn(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 8495fa2a082..bad58c32cdb 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -670,6 +670,17 @@ static void wm_drag_draw_item_name(wmDrag *drag, const int x, const int y) UI_fontstyle_draw_simple(fstyle, x, y, WM_drag_get_item_name(drag), text_col); } +void WM_drag_draw_item_name_fn(bContext *UNUSED(C), + wmWindow *UNUSED(win), + wmDrag *drag, + const int xy[2]) +{ + int x = xy[0] + 10 * UI_DPI_FAC; + int y = xy[1] + 1 * UI_DPI_FAC; + + wm_drag_draw_item_name(drag, x, y); +} + static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2]) { if (!CTX_wm_region(C)) { |