diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 05:42:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 05:42:17 +0400 |
commit | b6c439d0c425f918d49ebef4fe3922f8543553cf (patch) | |
tree | 79c54039943a164218d497d306b0f1f098a0f610 /source/blender | |
parent | b6bb6d1b2c6f16c3c325242d15ef6d65d40f1a74 (diff) |
UI: remove number specific button offset when selecting text
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 1144ebc7fe0..1ec057e964b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1984,17 +1984,13 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, con BLI_strncpy(origstr, but->drawstr, data->maxlen); - /* XXX solve generic, see: #widget_draw_text_icon */ - if (but->type == NUM || but->type == NUMSLI) { - startx += (int)(UI_TEXT_MARGIN_X * U.widget_unit); - } - else if (ELEM3(but->type, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) { + if (ELEM3(but->type, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) { if (but->flag & UI_HAS_ICON) { startx += UI_DPI_ICON_SIZE; } - /* but this extra .05 makes clicks inbetween characters feel nicer */ - startx += ((UI_TEXT_MARGIN_X + 0.05f) * U.widget_unit); } + /* but this extra .05 makes clicks inbetween characters feel nicer */ + startx += ((UI_TEXT_MARGIN_X + 0.05f) * U.widget_unit); /* mouse dragged outside the widget to the left */ if (x < startx) { |