Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_widgets.c
| Show First 20 Lines • Show All 2,414 Lines • ▼ Show 20 Lines | |||||
| #ifdef USE_UI_TOOLBAR_HACK | #ifdef USE_UI_TOOLBAR_HACK | ||||
| but->block->aspect = aspect_orig; | but->block->aspect = aspect_orig; | ||||
| #endif | #endif | ||||
| rect->xmin += icon_size + icon_padding; | rect->xmin += icon_size + icon_padding; | ||||
| } | } | ||||
| if (!no_text_padding) { | if (!no_text_padding) { | ||||
| const int text_padding = (UI_TEXT_MARGIN_X * U.widget_unit) / but->block->aspect; | const float text_padding = (UI_TEXT_MARGIN_X * U.widget_unit) / but->block->aspect; | ||||
| if (but->editstr) { | if (but->editstr) { | ||||
| rect->xmin += text_padding; | rect->xmin += text_padding; | ||||
| } | } | ||||
| else if (but->flag & UI_BUT_DRAG_MULTI) { | else if (but->flag & UI_BUT_DRAG_MULTI) { | ||||
| const bool text_is_edited = ui_but_drag_multi_edit_get(but) != NULL; | const bool text_is_edited = ui_but_drag_multi_edit_get(but) != NULL; | ||||
| if (text_is_edited || (but->drawflag & UI_BUT_TEXT_LEFT)) { | if (text_is_edited || (but->drawflag & UI_BUT_TEXT_LEFT)) { | ||||
| rect->xmin += text_padding; | rect->xmin += text_padding; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,989 Lines • Show Last 20 Lines | |||||