diff options
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 742aed4fbb1..8a0084129dc 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -106,8 +106,8 @@ void ui_block_to_window_fl(const ARegion *ar, uiBlock *block, float *x, float *y float gx, gy; int sx, sy, getsizex, getsizey; - getsizex = BLI_RCT_SIZE_X(&ar->winrct) + 1; - getsizey = BLI_RCT_SIZE_Y(&ar->winrct) + 1; + getsizex = BLI_rcti_size_x(&ar->winrct) + 1; + getsizey = BLI_rcti_size_y(&ar->winrct) + 1; sx = ar->winrct.xmin; sy = ar->winrct.ymin; @@ -152,8 +152,8 @@ void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y float a, b, c, d, e, f, px, py; int sx, sy, getsizex, getsizey; - getsizex = BLI_RCT_SIZE_X(&ar->winrct) + 1; - getsizey = BLI_RCT_SIZE_Y(&ar->winrct) + 1; + getsizex = BLI_rcti_size_x(&ar->winrct) + 1; + getsizey = BLI_rcti_size_y(&ar->winrct) + 1; sx = ar->winrct.xmin; sy = ar->winrct.ymin; @@ -279,7 +279,7 @@ void ui_bounds_block(uiBlock *block) block->rect.ymax += block->bounds; } - block->rect.xmax = block->rect.xmin + maxf(BLI_RCT_SIZE_X(&block->rect), block->minbounds); + block->rect.xmax = block->rect.xmin + maxf(BLI_rctf_size_x(&block->rect), block->minbounds); /* hardcoded exception... but that one is annoying with larger safety */ bt = block->buttons.first; @@ -307,8 +307,8 @@ static void ui_centered_bounds_block(const bContext *C, uiBlock *block) ui_bounds_block(block); - width = BLI_RCT_SIZE_X(&block->rect); - height = BLI_RCT_SIZE_Y(&block->rect); + width = BLI_rctf_size_x(&block->rect); + height = BLI_rctf_size_y(&block->rect); startx = (xmax * 0.5f) - (width * 0.5f); starty = (ymax * 0.5f) - (height * 0.5f); @@ -332,8 +332,8 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, eBlockBound wm_window_get_size(window, &xmax, &ymax); - oldwidth = BLI_RCT_SIZE_X(&block->rect); - oldheight = BLI_RCT_SIZE_Y(&block->rect); + oldwidth = BLI_rctf_size_x(&block->rect); + oldheight = BLI_rctf_size_y(&block->rect); /* first we ensure wide enough text bounds */ if (bounds_calc == UI_BLOCK_BOUNDS_POPUP_MENU) { @@ -348,8 +348,8 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, eBlockBound ui_bounds_block(block); /* and we adjust the position to fit within window */ - width = BLI_RCT_SIZE_X(&block->rect); - height = BLI_RCT_SIZE_Y(&block->rect); + width = BLI_rctf_size_x(&block->rect); + height = BLI_rctf_size_y(&block->rect); /* avoid divide by zero below, caused by calling with no UI, but better not crash */ oldwidth = oldwidth > 0 ? oldwidth : MAX2(1, width); @@ -495,10 +495,10 @@ static void ui_draw_linkline(uiLinkLine *line, int highlightActiveLines) if (line->from == NULL || line->to == NULL) return; - rect.xmin = BLI_RCT_CENTER_X(&line->from->rect); - rect.ymin = BLI_RCT_CENTER_Y(&line->from->rect); - rect.xmax = BLI_RCT_CENTER_X(&line->to->rect); - rect.ymax = BLI_RCT_CENTER_Y(&line->to->rect); + rect.xmin = BLI_rctf_cent_x(&line->from->rect); + rect.ymin = BLI_rctf_cent_y(&line->from->rect); + rect.xmax = BLI_rctf_cent_x(&line->to->rect); + rect.ymax = BLI_rctf_cent_y(&line->to->rect); if (line->flag & UI_SELECT) glColor3ub(100, 100, 100); @@ -2257,7 +2257,7 @@ void ui_check_but(uiBut *but) /* safety is 4 to enable small number buttons (like 'users') */ - // okwidth= -4 + (BLI_RCT_SIZE_X(&but->rect)); // UNUSED + // okwidth= -4 + (BLI_rcti_size_x(&but->rect)); // UNUSED /* name: */ switch (but->type) { @@ -2265,7 +2265,7 @@ void ui_check_but(uiBut *but) case MENU: case ICONTEXTROW: - if (BLI_RCT_SIZE_X(&but->rect) > 24.0f) { + if (BLI_rctf_size_x(&but->rect) > 24.0f) { UI_GET_BUT_VALUE_INIT(but, value); ui_set_name_menu(but, (int)value); } |