diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-12-20 07:06:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-12-20 07:06:22 +0300 |
commit | 3143b2f9424a10b1baf960c6a0bbb274cdeffe1d (patch) | |
tree | 9d2095cc94207268aa0160a34db0eb27317e5af7 /source/blender/editors/interface | |
parent | b3bcbc9e85aaad3c6262e8203c69d4089d5d8154 (diff) | |
parent | 51f0c3fadf085b087a9f98a59db41af6aa632a57 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 11 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_region_tooltip.c | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index b06e787329b..5218a9b8216 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -130,7 +130,6 @@ static bool ui_mouse_motion_keynav_test(struct uiKeyNavLock *keynav, const wmEve /***************** structs and defines ****************/ -#define BUTTON_TOOLTIP_DELAY 0.500 #define BUTTON_FLASH_DELAY 0.020 #define MENU_SCROLL_INTERVAL 0.1 #define PIE_MENU_INTERVAL 0.01 @@ -7697,8 +7696,8 @@ void UI_but_tooltip_refresh(bContext *C, uiBut *but) data = but->active; if (data && data->tooltip) { - ui_tooltip_free(C, data->tooltip); - data->tooltip = ui_tooltip_create_from_button(C, data->region, but); + UI_tooltip_free(C, data->tooltip); + data->tooltip = UI_tooltip_create_from_button(C, data->region, but); } } @@ -7715,7 +7714,7 @@ void UI_but_tooltip_timer_remove(bContext *C, uiBut *but) data->tooltiptimer = NULL; } if (data->tooltip) { - ui_tooltip_free(C, data->tooltip); + UI_tooltip_free(C, data->tooltip); data->tooltip = NULL; } @@ -7741,7 +7740,7 @@ static void button_tooltip_timer_reset(bContext *C, uiBut *but) if ((U.flag & USER_TOOLTIPS) || (data->tooltip_force)) { if (!but->block->tooltipdisabled) { if (!wm->drags.first) { - data->tooltiptimer = WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_TOOLTIP_DELAY); + data->tooltiptimer = WM_event_add_timer(data->wm, data->window, TIMER, UI_TOOLTIP_DELAY); } } } @@ -8443,7 +8442,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) data->tooltiptimer = NULL; if (!data->tooltip) - data->tooltip = ui_tooltip_create_from_button(C, data->region, but); + data->tooltip = UI_tooltip_create_from_button(C, data->region, but); } /* handle menu auto open timer */ else if (event->customdata == data->autoopentimer) { diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 21e72053ded..8d7f9d47ab5 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -590,8 +590,7 @@ struct uiPopupBlockHandle { /* interface_region_*.c */ /* interface_region_tooltip.c */ -struct ARegion *ui_tooltip_create_from_button(struct bContext *C, struct ARegion *butregion, uiBut *but); -void ui_tooltip_free(struct bContext *C, struct ARegion *ar); +/* exposed as public API in UI_interface.h */ /* interface_region_color_picker.c */ void ui_rgb_to_color_picker_compat_v(const float rgb[3], float r_cp[3]); diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 959d4ae86f5..bdc13f58226 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -781,7 +781,7 @@ static ARegion *ui_tooltip_create_with_data( * \{ */ -ARegion *ui_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but) +ARegion *UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but) { wmWindow *win = CTX_wm_window(C); /* aspect values that shrink text are likely unreadable */ @@ -827,7 +827,7 @@ ARegion *ui_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *b return ui_tooltip_create_with_data(C, data, init_position, aspect); } -void ui_tooltip_free(bContext *C, ARegion *ar) +void UI_tooltip_free(bContext *C, ARegion *ar) { ui_region_temp_remove(C, CTX_wm_screen(C), ar); } |