diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 768fc12a0c2..7afc00f5a07 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3261,7 +3261,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton } } else if (data->state == BUTTON_STATE_NUM_EDITING) { - if (event->type == ESCKEY) { + if (event->type == ESCKEY || event->type == RIGHTMOUSE) { data->cancel = TRUE; data->escapecancel = TRUE; button_activate_state(C, but, BUTTON_STATE_EXIT); @@ -3839,7 +3839,7 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu } } else if (data->state == BUTTON_STATE_NUM_EDITING) { - if (event->type == ESCKEY) { + if (event->type == ESCKEY || event->type == RIGHTMOUSE) { data->cancel = TRUE; data->escapecancel = TRUE; button_activate_state(C, but, BUTTON_STATE_EXIT); @@ -4036,7 +4036,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle } } else if (data->state == BUTTON_STATE_NUM_EDITING) { - if (event->type == ESCKEY) { + if (event->type == ESCKEY || event->type == RIGHTMOUSE) { data->cancel = TRUE; data->escapecancel = TRUE; button_activate_state(C, but, BUTTON_STATE_EXIT); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 96c8ded46da..b5b10b623d2 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3527,7 +3527,6 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int rcti trect = *rect, bg_rect; float font_dims[2] = {0.0f, 0.0f}; uiWidgetType *wt = widget_type(UI_WTYPE_MENU_ITEM); - unsigned char bg_col[3]; wt->state(wt, state); wt->draw(&wt->wcol, rect, 0, 0); @@ -3553,16 +3552,12 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int if (bg_rect.xmax > rect->xmax - PREVIEW_PAD) bg_rect.xmax = rect->xmax - PREVIEW_PAD; - UI_GetThemeColor3ubv(TH_BUTBACK, bg_col); - glColor4ubv((unsigned char *)wt->wcol.item); + glColor4ubv((unsigned char *)wt->wcol_theme->inner_sel); glEnable(GL_BLEND); glRecti(bg_rect.xmin, bg_rect.ymin, bg_rect.xmax, bg_rect.ymax); glDisable(GL_BLEND); - if (state == UI_ACTIVE) - glColor4ubv((unsigned char *)wt->wcol.text); - else - glColor4ubv((unsigned char *)wt->wcol.text_sel); + glColor3ubv((unsigned char *)wt->wcol.text); uiStyleFontDraw(fstyle, &trect, name); }