Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_widgets.c
| Show All 23 Lines | |||||
| #include <assert.h> | #include <assert.h> | ||||
| #include <limits.h> | #include <limits.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include "DNA_brush_types.h" | #include "DNA_brush_types.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "BLI_listbase.h" | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_rect.h" | #include "BLI_rect.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_string_utf8.h" | #include "BLI_string_utf8.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| ▲ Show 20 Lines • Show All 2,197 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void widget_draw_extra_icons(const uiWidgetColors *wcol, | static void widget_draw_extra_icons(const uiWidgetColors *wcol, | ||||
| uiBut *but, | uiBut *but, | ||||
| rcti *rect, | rcti *rect, | ||||
| float alpha) | float alpha) | ||||
| { | { | ||||
| /* inverse order, from right to left. */ | /* inverse order, from right to left. */ | ||||
| for (uiButExtraOpIcon *op_icon = but->extra_op_icons.last; op_icon; op_icon = op_icon->prev) { | LISTBASE_FOREACH_BACKWARD (uiButExtraOpIcon *, op_icon, &but->extra_op_icons) { | ||||
| rcti temp = *rect; | rcti temp = *rect; | ||||
| temp.xmin = temp.xmax - (BLI_rcti_size_y(rect) * 1.08f); | temp.xmin = temp.xmax - (BLI_rcti_size_y(rect) * 1.08f); | ||||
| widget_draw_icon(but, op_icon->icon, alpha, &temp, wcol->text); | widget_draw_icon(but, op_icon->icon, alpha, &temp, wcol->text); | ||||
| rect->xmax -= ICON_SIZE_FROM_BUTRECT(rect); | rect->xmax -= ICON_SIZE_FROM_BUTRECT(rect); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,115 Lines • Show Last 20 Lines | |||||