Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_icons.c
| Show First 20 Lines • Show All 451 Lines • ▼ Show 20 Lines | |||||
| DEF_ICON_VECTOR_COLORSET_DRAW_NTH(17, 16) | DEF_ICON_VECTOR_COLORSET_DRAW_NTH(17, 16) | ||||
| DEF_ICON_VECTOR_COLORSET_DRAW_NTH(18, 17) | DEF_ICON_VECTOR_COLORSET_DRAW_NTH(18, 17) | ||||
| DEF_ICON_VECTOR_COLORSET_DRAW_NTH(19, 18) | DEF_ICON_VECTOR_COLORSET_DRAW_NTH(19, 18) | ||||
| DEF_ICON_VECTOR_COLORSET_DRAW_NTH(20, 19) | DEF_ICON_VECTOR_COLORSET_DRAW_NTH(20, 19) | ||||
| # undef DEF_ICON_VECTOR_COLORSET_DRAW_NTH | # undef DEF_ICON_VECTOR_COLORSET_DRAW_NTH | ||||
| static void vicon_collection_color_draw( | static void vicon_collection_color_draw( | ||||
| short color_tag, int x, int y, int UNUSED(w), int UNUSED(h), float UNUSED(alpha)) | short color_tag, int x, int y, int w, int UNUSED(h), float UNUSED(alpha)) | ||||
| { | { | ||||
| bTheme *btheme = UI_GetTheme(); | bTheme *btheme = UI_GetTheme(); | ||||
| const ThemeCollectionColor *collection_color = &btheme->collection_color[color_tag]; | const ThemeCollectionColor *collection_color = &btheme->collection_color[color_tag]; | ||||
| const float aspect = (float)ICON_DEFAULT_WIDTH / (float)w; | |||||
| UI_icon_draw_ex( | UI_icon_draw_ex( | ||||
| x, y, ICON_OUTLINER_COLLECTION, U.inv_dpi_fac, 1.0f, 0.0f, collection_color->color, true); | x, y, ICON_OUTLINER_COLLECTION, aspect, 1.0f, 0.0f, collection_color->color, true); | ||||
| } | } | ||||
| # define DEF_ICON_COLLECTION_COLOR_DRAW(index, color) \ | # define DEF_ICON_COLLECTION_COLOR_DRAW(index, color) \ | ||||
| static void vicon_collection_color_draw_##index(int x, int y, int w, int h, float alpha) \ | static void vicon_collection_color_draw_##index(int x, int y, int w, int h, float alpha) \ | ||||
| { \ | { \ | ||||
| vicon_collection_color_draw(color, x, y, w, h, alpha); \ | vicon_collection_color_draw(color, x, y, w, h, alpha); \ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,975 Lines • Show Last 20 Lines | |||||