Merge branch 'master' into blender2.8
This commit is contained in:
@@ -1255,9 +1255,9 @@ static int ui_but_draw_menu_icon(const uiBut *but)
|
||||
|
||||
/* icons have been standardized... and this call draws in untransformed coordinates */
|
||||
|
||||
static void widget_draw_icon(
|
||||
const uiBut *but, BIFIconID icon, float alpha, const rcti *rect,
|
||||
const bool show_menu_icon)
|
||||
static void widget_draw_icon_ex(
|
||||
const uiBut *but, BIFIconID icon, float alpha, const rcti *rect, const bool show_menu_icon,
|
||||
const int icon_size)
|
||||
{
|
||||
float xs = 0.0f, ys = 0.0f;
|
||||
float aspect, height;
|
||||
@@ -1273,7 +1273,7 @@ static void widget_draw_icon(
|
||||
if (icon == ICON_BLANK1 && (but->flag & UI_BUT_ICON_SUBMENU) == 0) return;
|
||||
|
||||
aspect = but->block->aspect / UI_DPI_FAC;
|
||||
height = ICON_DEFAULT_HEIGHT / aspect;
|
||||
height = icon_size / aspect;
|
||||
|
||||
/* calculate blend color */
|
||||
if (ELEM(but->type, UI_BTYPE_TOGGLE, UI_BTYPE_ROW, UI_BTYPE_TOGGLE_N, UI_BTYPE_LISTROW)) {
|
||||
@@ -1337,6 +1337,12 @@ static void widget_draw_icon(
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static void widget_draw_icon(
|
||||
const uiBut *but, BIFIconID icon, float alpha, const rcti *rect, const bool show_menu_icon)
|
||||
{
|
||||
widget_draw_icon_ex(but, icon, alpha, rect, show_menu_icon, ICON_DEFAULT_HEIGHT);
|
||||
}
|
||||
|
||||
static void ui_text_clip_give_prev_off(uiBut *but, const char *str)
|
||||
{
|
||||
const char *prev_utf8 = BLI_str_find_prev_char_utf8(str, str + but->ofs);
|
||||
|
||||
Reference in New Issue
Block a user