Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_widgets.c
| Show First 20 Lines • Show All 3,540 Lines • ▼ Show 20 Lines | |||||
| static int widget_roundbox_set(uiBut *but, rcti *rect) | static int widget_roundbox_set(uiBut *but, rcti *rect) | ||||
| { | { | ||||
| int roundbox = UI_CNR_ALL; | int roundbox = UI_CNR_ALL; | ||||
| /* alignment */ | /* alignment */ | ||||
| if ((but->drawflag & UI_BUT_ALIGN) && but->type != UI_BTYPE_PULLDOWN) { | if ((but->drawflag & UI_BUT_ALIGN) && but->type != UI_BTYPE_PULLDOWN) { | ||||
| /* ui_block_position has this correction too, keep in sync */ | /* ui_block_position has this correction too, keep in sync */ | ||||
| if (but->drawflag & UI_BUT_ALIGN_TOP) | if (but->drawflag & (UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_STITCH_TOP)) | ||||
| rect->ymax += U.pixelsize; | rect->ymax += U.pixelsize; | ||||
| if (but->drawflag & UI_BUT_ALIGN_LEFT) | if (but->drawflag & (UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_STITCH_LEFT)) | ||||
| rect->xmin -= U.pixelsize; | rect->xmin -= U.pixelsize; | ||||
| switch (but->drawflag & UI_BUT_ALIGN) { | switch (but->drawflag & UI_BUT_ALIGN) { | ||||
| case UI_BUT_ALIGN_TOP: | case UI_BUT_ALIGN_TOP: | ||||
| roundbox = UI_CNR_BOTTOM_LEFT | UI_CNR_BOTTOM_RIGHT; | roundbox = UI_CNR_BOTTOM_LEFT | UI_CNR_BOTTOM_RIGHT; | ||||
| break; | break; | ||||
| case UI_BUT_ALIGN_DOWN: | case UI_BUT_ALIGN_DOWN: | ||||
| roundbox = UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; | roundbox = UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; | ||||
| ▲ Show 20 Lines • Show All 594 Lines • Show Last 20 Lines | |||||