Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_widgets.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| #ifdef USE_NUMBUTS_LR_ALIGN | #ifdef USE_NUMBUTS_LR_ALIGN | ||||
| if (!drawstr_right && (but->drawflag & UI_BUT_TEXT_LEFT) && | if (!drawstr_right && (but->drawflag & UI_BUT_TEXT_LEFT) && | ||||
| ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) && | ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) && | ||||
| /* if we're editing or multi-drag (fake editing), then use left alignment */ | /* if we're editing or multi-drag (fake editing), then use left alignment */ | ||||
| (but->editstr == NULL) && (drawstr == but->drawstr)) { | (but->editstr == NULL) && (drawstr == but->drawstr)) { | ||||
| drawstr_right = strrchr(drawstr + but->ofs, ':'); | drawstr_right = strrchr(drawstr + but->ofs, ':'); | ||||
| if (drawstr_right) { | if (drawstr_right) { | ||||
| drawstr_right++; | drawstr_right++; | ||||
| drawstr_left_len = (drawstr_right - drawstr); | drawstr_left_len = (drawstr_right - drawstr - 1); | ||||
| while (*drawstr_right == ' ') { | while (*drawstr_right == ' ') { | ||||
| drawstr_right++; | drawstr_right++; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* no prefix, even so use only cpoin */ | /* no prefix, even so use only cpoin */ | ||||
| drawstr_right = drawstr + but->ofs; | drawstr_right = drawstr + but->ofs; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||