Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_layout.c
| Show First 20 Lines • Show All 1,020 Lines • ▼ Show 20 Lines | #ifdef UI_PROP_DECORATE | ||||
| if (use_prop_sep) { | if (use_prop_sep) { | ||||
| layout_prop_decorate = uiItemL_respect_property_split(layout, name, 0); | layout_prop_decorate = uiItemL_respect_property_split(layout, name, 0); | ||||
| } | } | ||||
| else | else | ||||
| #endif | #endif | ||||
| { | { | ||||
| int w_label; | int w_label; | ||||
| if (ui_layout_variable_size(layout)) { | if (ui_layout_variable_size(layout)) { | ||||
| /* w_hint is width for label in this case. | /* In this case, a pure label without additional padding. | ||||
| * Use a default width for property button(s) */ | * Use a default width for property button(s). */ | ||||
| prop_but_width = UI_UNIT_X * 5; | prop_but_width = UI_UNIT_X * 5; | ||||
| w_label = w_hint; | w_label = ui_text_icon_width_ex(layout, name, ICON_NONE, &ui_text_pad_none); | ||||
| } | } | ||||
| else { | else { | ||||
| w_label = w_hint / 3; | w_label = w_hint / 3; | ||||
| } | } | ||||
| uiDefBut(block, UI_BTYPE_LABEL, 0, name, x, y, w_label, h, NULL, 0.0, 0.0, 0, 0, ""); | uiDefBut(block, UI_BTYPE_LABEL, 0, name, x, y, w_label, h, NULL, 0.0, 0.0, 0, 0, ""); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,942 Lines • Show Last 20 Lines | |||||