Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/buttons_context.c
| Show First 20 Lines • Show All 1,097 Lines • ▼ Show 20 Lines | void buttons_context_draw(const bContext *C, uiLayout *layout) | ||||
| if (!path) | if (!path) | ||||
| return; | return; | ||||
| row = uiLayoutRow(layout, true); | row = uiLayoutRow(layout, true); | ||||
| uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT); | uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT); | ||||
| block = uiLayoutGetBlock(row); | block = uiLayoutGetBlock(row); | ||||
| uiBlockSetEmboss(block, UI_EMBOSSN); | UI_block_emboss_set(block, UI_EMBOSS_NONE); | ||||
| but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, | but = uiDefIconButBitC(block, UI_BTYPE_ICON_TOGGLE, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, | ||||
| 0, 0, 0, 0, TIP_("Follow context or keep fixed datablock displayed")); | 0, 0, 0, 0, TIP_("Follow context or keep fixed datablock displayed")); | ||||
| uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ | UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */ | ||||
| uiButSetFunc(but, pin_cb, NULL, NULL); | UI_but_func_set(but, pin_cb, NULL, NULL); | ||||
| for (a = 0; a < path->len; a++) { | for (a = 0; a < path->len; a++) { | ||||
| ptr = &path->ptr[a]; | ptr = &path->ptr[a]; | ||||
| if (a != 0) | if (a != 0) | ||||
| uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC); | uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC); | ||||
| if (ptr->data) { | if (ptr->data) { | ||||
| ▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines | |||||