diff options
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index d9db5c930fc..58e654cb3c8 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -301,7 +301,7 @@ static void ui_item_position(uiItem *item, int x, int y, int w, int h) bitem->but->rect.ymin = y; bitem->but->rect.xmax = x + w; bitem->but->rect.ymax = y + h; - + ui_but_update(bitem->but); /* for strlen */ } else { @@ -321,7 +321,7 @@ static void ui_item_move(uiItem *item, int delta_xmin, int delta_xmax) bitem->but->rect.xmin += delta_xmin; bitem->but->rect.xmax += delta_xmax; - + ui_but_update(bitem->but); /* for strlen */ } else { @@ -361,7 +361,7 @@ static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int a sub = uiLayoutRow(layout, align); else sub = uiLayoutColumn(layout, align); - + sub->space = 0; return sub; } @@ -431,9 +431,9 @@ static void ui_item_array( if (ptr->type == &RNA_Armature) { bArmature *arm = (bArmature *)ptr->data; - + layer_used = arm->layer_used; - + if (arm->edbo) { if (arm->act_edbone) { layer_active |= arm->act_edbone->layer; @@ -452,7 +452,7 @@ static void ui_item_array( for (a = 0; a < colbuts; a++) { const int layer_num = a + b * colbuts; const unsigned int layer_flag = (1u << layer_num); - + if (layer_used & layer_flag) { if (layer_active & layer_flag) icon = ICON_LAYER_ACTIVE; @@ -470,7 +470,7 @@ static void ui_item_array( for (a = 0; a < colbuts; a++) { const int layer_num = a + len / 2 + b * colbuts; const unsigned int layer_flag = (1u << layer_num); - + if (layer_used & layer_flag) { if (layer_active & layer_flag) icon = ICON_LAYER_ACTIVE; @@ -498,7 +498,7 @@ static void ui_item_array( totdim = RNA_property_array_dimension(ptr, prop, dim_size); if (totdim != 2) return; /* only 2D matrices supported in UI so far */ - + w /= dim_size[0]; /* h /= dim_size[1]; */ /* UNUSED */ @@ -1451,7 +1451,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if (icon == ICON_NONE) icon = RNA_property_ui_icon(prop); - + if (flag & UI_ITEM_R_ICON_ONLY) { /* pass */ } @@ -1504,7 +1504,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if (no_bg) { layout->emboss = UI_EMBOSS_NONE; } - + /* array property */ if (index == RNA_NO_INDEX && is_array) ui_item_array( @@ -1526,7 +1526,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index else if (type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) { but = ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag); ui_but_add_search(but, ptr, prop, NULL, NULL); - + if (layout->redalert) UI_but_flag_enable(but, UI_BUT_REDALERT); } @@ -1539,7 +1539,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if (toggle && but->type == UI_BTYPE_CHECKBOX) but->type = UI_BTYPE_TOGGLE; - + if (layout->redalert) UI_but_flag_enable(but, UI_BUT_REDALERT); } @@ -1783,7 +1783,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna StructRNA *icontype; int w, h; char namestr[UI_MAX_NAME_STR]; - + /* validate arguments */ prop = RNA_struct_find_property(ptr, propname); @@ -1792,7 +1792,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna RNA_struct_identifier(ptr->type), propname); return; } - + type = RNA_property_type(prop); if (!ELEM(type, PROP_POINTER, PROP_STRING, PROP_ENUM)) { RNA_warning("Property %s must be a pointer, string or enum", propname); @@ -2296,7 +2296,7 @@ static void ui_litem_layout_row(uiLayout *litem) if (totw == 0) return; - + if (w != 0) w -= (tot - 1) * litem->space; fixedw = 0; @@ -2327,7 +2327,7 @@ static void ui_litem_layout_row(uiLayout *litem) /* ignore min flag for rows with right or center alignment */ if (item->type != ITEM_BUTTON && ELEM(((uiLayout *)item)->alignment, UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_ALIGN_CENTER) && - litem->alignment == UI_LAYOUT_ALIGN_EXPAND && + litem->alignment == UI_LAYOUT_ALIGN_EXPAND && ((uiItem *)litem)->flag & UI_ITEM_MIN) { min_flag = false; @@ -2435,7 +2435,7 @@ static void ui_litem_estimate_column(uiLayout *litem, bool is_box) if (item->next && (!is_box || item != litem->items.first)) litem->h += litem->space; } - + if (min_size_flag) { litem->item.flag |= UI_ITEM_MIN; } @@ -2825,7 +2825,7 @@ static void ui_litem_layout_absolute(uiLayout *litem) scalex = (float)litem->w / (float)totw; if (litem->h && toth > 0) scaley = (float)litem->h / (float)toth; - + x = litem->x; y = litem->y - scaley * toth; @@ -2876,7 +2876,7 @@ static void ui_litem_layout_split(uiLayout *litem) y = litem->y; percentage = (split->percentage == 0.0f) ? 1.0f / (float)tot : split->percentage; - + w = (litem->w - (tot - 1) * litem->space); colw = w * percentage; colw = MAX2(colw, 0); @@ -3509,7 +3509,7 @@ uiLayout *UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int s BLI_addtail(&block->layouts, root); ui_layout_add_padding_button(root); - + return layout; } @@ -3532,7 +3532,7 @@ void UI_block_layout_set_current(uiBlock *block, uiLayout *layout) void ui_layout_add_but(uiLayout *layout, uiBut *but) { uiButtonItem *bitem; - + bitem = MEM_callocN(sizeof(uiButtonItem), "uiButtonItem"); bitem->item.type = ITEM_BUTTON; bitem->but = but; |