diff --git a/release/datafiles/icons_svg/checkmark_overlay.svg b/release/datafiles/icons_svg/checkmark_overlay.svg new file mode 100644 index 00000000000..3858b9e95ed --- /dev/null +++ b/release/datafiles/icons_svg/checkmark_overlay.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/error_overlay.svg b/release/datafiles/icons_svg/error_overlay.svg new file mode 100644 index 00000000000..6dcc6c52c63 --- /dev/null +++ b/release/datafiles/icons_svg/error_overlay.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/heart_overlay.svg b/release/datafiles/icons_svg/heart_overlay.svg new file mode 100644 index 00000000000..1f9fc980a4b --- /dev/null +++ b/release/datafiles/icons_svg/heart_overlay.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/info_overlay.svg b/release/datafiles/icons_svg/info_overlay.svg new file mode 100644 index 00000000000..437f5c2fc05 --- /dev/null +++ b/release/datafiles/icons_svg/info_overlay.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/question_overlay.svg b/release/datafiles/icons_svg/question_overlay.svg new file mode 100644 index 00000000000..41ab1fb2823 --- /dev/null +++ b/release/datafiles/icons_svg/question_overlay.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/remove_overlay.svg b/release/datafiles/icons_svg/remove_overlay.svg new file mode 100644 index 00000000000..5dde4fe9833 --- /dev/null +++ b/release/datafiles/icons_svg/remove_overlay.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/ribbon_overlay.svg b/release/datafiles/icons_svg/ribbon_overlay.svg new file mode 100644 index 00000000000..c1fad82f7b1 --- /dev/null +++ b/release/datafiles/icons_svg/ribbon_overlay.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/star_overlay.svg b/release/datafiles/icons_svg/star_overlay.svg new file mode 100644 index 00000000000..92acb50c6ea --- /dev/null +++ b/release/datafiles/icons_svg/star_overlay.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/warning_overlay.svg b/release/datafiles/icons_svg/warning_overlay.svg new file mode 100644 index 00000000000..e7c3e6ec94f --- /dev/null +++ b/release/datafiles/icons_svg/warning_overlay.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index cf5b5ed9ed1..a730df8d70c 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -211,6 +211,7 @@ if(WITH_BLENDER) checkbox_dehlt checkbox_hlt checkmark + checkmark_overlay clipuv_dehlt clipuv_hlt collapsemenu @@ -295,6 +296,7 @@ if(WITH_BLENDER) empty_data empty_single_arrow error + error_overlay experimental export external_drive @@ -386,6 +388,7 @@ if(WITH_BLENDER) handle_free handle_vector heart + heart_overlay help hide_off hide_on @@ -408,6 +411,7 @@ if(WITH_BLENDER) indirect_only_on info info_large + info_overlay internet internet_offline inversesquarecurve @@ -709,6 +713,7 @@ if(WITH_BLENDER) prop_projected question question_large + question_overlay quit radiobut_off radiobut_on @@ -717,6 +722,7 @@ if(WITH_BLENDER) record_on recover_last remove + remove_overlay renderlayers render_animation render_result @@ -732,6 +738,7 @@ if(WITH_BLENDER) restrict_view_off restrict_view_on rew + ribbon_overlay rightarrow rightarrow_thin rigid_body @@ -801,6 +808,7 @@ if(WITH_BLENDER) split_horizontal split_vertical spreadsheet + star_overlay statusbar sticky_uvs_disable sticky_uvs_loc @@ -881,6 +889,7 @@ if(WITH_BLENDER) volume_data vpaint_hlt warning_large + warning_overlay window wordwrap_off wordwrap_on diff --git a/source/blender/editors/include/UI_icons.hh b/source/blender/editors/include/UI_icons.hh index 3d1de9b9704..44b58cd343c 100644 --- a/source/blender/editors/include/UI_icons.hh +++ b/source/blender/editors/include/UI_icons.hh @@ -841,6 +841,16 @@ DEF_ICON(KEY_TAB_FILLED) DEF_ICON(KEY_WINDOWS) DEF_ICON(KEY_WINDOWS_FILLED) +DEF_ICON_COLOR(WARNING_OVERLAY) +DEF_ICON_COLOR(ERROR_OVERLAY) +DEF_ICON_COLOR(INFO_OVERLAY) +DEF_ICON_COLOR(QUESTION_OVERLAY) +DEF_ICON_COLOR(CHECKMARK_OVERLAY) +DEF_ICON_COLOR(REMOVE_OVERLAY) +DEF_ICON_COLOR(STAR_OVERLAY) +DEF_ICON_COLOR(RIBBON_OVERLAY) +DEF_ICON_COLOR(HEART_OVERLAY) + /* The items above are initiated sequentially while the ones that * follow are initiated individually. Therefore this item marks * the boundary. Add regular SVG icons above this one.*/ diff --git a/source/blender/editors/include/UI_interface_icons.hh b/source/blender/editors/include/UI_interface_icons.hh index fffadc95cb1..8ede4eb3a17 100644 --- a/source/blender/editors/include/UI_interface_icons.hh +++ b/source/blender/editors/include/UI_interface_icons.hh @@ -25,6 +25,7 @@ struct bContext; struct IconTextOverlay { char text[5]; uchar color[4] = {0}; + int icon = 0; }; #define UI_NO_ICON_OVERLAY_TEXT NULL diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc index 51142620c7f..d7a4fa7427d 100644 --- a/source/blender/editors/interface/interface_icons.cc +++ b/source/blender/editors/interface/interface_icons.cc @@ -1572,6 +1572,16 @@ static void icon_draw_size(float x, nullptr); } + if (text_overlay && text_overlay->icon) { + BLF_draw_svg_icon(uint(text_overlay->icon), + x + (float(draw_size) * 0.35f / aspect), + y + (float(draw_size) * 0.35f / aspect), + float(draw_size) * 0.75f / aspect, + nullptr, + outline_intensity, + true); + } + if (text_overlay && text_overlay->text[0] != '\0') { /* Handle the little numbers on top of the icon. */ uchar text_color[4]; diff --git a/source/blender/editors/interface/templates/interface_templates.cc b/source/blender/editors/interface/templates/interface_templates.cc index ca63093e319..ec56aeed45e 100644 --- a/source/blender/editors/interface/templates/interface_templates.cc +++ b/source/blender/editors/interface/templates/interface_templates.cc @@ -7555,6 +7555,9 @@ int uiTemplateRecentFiles(uiLayout *layout, int rows) uiBut *but = ui_but_last(block); UI_but_func_tooltip_custom_set( but, uiTemplateRecentFiles_tooltip_func, BLI_strdup(recent->filepath), MEM_freeN); + if (!BLI_exists(recent->filepath)) { + but->icon_overlay_text.icon = ICON_ERROR_OVERLAY; + } } return i;