Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c4
-rw-r--r--source/blender/editors/interface/interface_draw.c24
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/interface/interface_panel.c2
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/interface/interface_widgets.c12
-rw-r--r--source/blender/editors/interface/view2d_ops.c10
7 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index beb57b44248..6374314e4bb 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -238,7 +238,7 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
bt->rect.xmax = bt->rect.xmin + i + block->bounds;
if (col == lastcol) {
- bt->rect.xmax = maxf(bt->rect.xmax, offset + block->minbounds);
+ bt->rect.xmax = max_ff(bt->rect.xmax, offset + block->minbounds);
}
ui_check_but(bt); /* clips text again */
@@ -275,7 +275,7 @@ void ui_bounds_block(uiBlock *block)
block->rect.ymax += block->bounds;
}
- block->rect.xmax = block->rect.xmin + maxf(BLI_rctf_size_x(&block->rect), block->minbounds);
+ block->rect.xmax = block->rect.xmin + max_ff(BLI_rctf_size_x(&block->rect), block->minbounds);
/* hardcoded exception... but that one is annoying with larger safety */
bt = block->buttons.first;
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 426daa69272..a73954e2075 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -161,12 +161,12 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
glGetFloatv(GL_CURRENT_COLOR, color);
/* 'shade' defines strength of shading */
- coltop[0] = minf(1.0f, color[0] + shadetop);
- coltop[1] = minf(1.0f, color[1] + shadetop);
- coltop[2] = minf(1.0f, color[2] + shadetop);
- coldown[0] = maxf(0.0f, color[0] + shadedown);
- coldown[1] = maxf(0.0f, color[1] + shadedown);
- coldown[2] = maxf(0.0f, color[2] + shadedown);
+ coltop[0] = min_ff(1.0f, color[0] + shadetop);
+ coltop[1] = min_ff(1.0f, color[1] + shadetop);
+ coltop[2] = min_ff(1.0f, color[2] + shadetop);
+ coldown[0] = max_ff(0.0f, color[0] + shadedown);
+ coldown[1] = max_ff(0.0f, color[1] + shadedown);
+ coldown[2] = max_ff(0.0f, color[2] + shadedown);
glShadeModel(GL_SMOOTH);
glBegin(mode);
@@ -270,12 +270,12 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
glGetFloatv(GL_CURRENT_COLOR, color);
/* 'shade' defines strength of shading */
- colLeft[0] = minf(1.0f, color[0] + shadeLeft);
- colLeft[1] = minf(1.0f, color[1] + shadeLeft);
- colLeft[2] = minf(1.0f, color[2] + shadeLeft);
- colRight[0] = maxf(0.0f, color[0] + shadeRight);
- colRight[1] = maxf(0.0f, color[1] + shadeRight);
- colRight[2] = maxf(0.0f, color[2] + shadeRight);
+ colLeft[0] = min_ff(1.0f, color[0] + shadeLeft);
+ colLeft[1] = min_ff(1.0f, color[1] + shadeLeft);
+ colLeft[2] = min_ff(1.0f, color[2] + shadeLeft);
+ colRight[0] = max_ff(0.0f, color[0] + shadeRight);
+ colRight[1] = max_ff(0.0f, color[1] + shadeRight);
+ colRight[2] = max_ff(0.0f, color[2] + shadeRight);
glShadeModel(GL_SMOOTH);
glBegin(mode);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 445182fb325..dc7ea930e45 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3460,7 +3460,7 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, float
data->ungrab_mval[0] = mx_fl;
data->ungrab_mval[1] = my_fl;
{ /* clamp */
- const float radius = minf(BLI_rctf_size_x(&but->rect), BLI_rctf_size_y(&but->rect)) / 2.0f;
+ const float radius = min_ff(BLI_rctf_size_x(&but->rect), BLI_rctf_size_y(&but->rect)) / 2.0f;
const float cent[2] = {BLI_rctf_cent_x(&but->rect), BLI_rctf_cent_y(&but->rect)};
const float len = len_v2v2(cent, data->ungrab_mval);
if (len > radius) {
@@ -4008,7 +4008,7 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
}
else {
/* scale histogram values (dy / 10 for better control) */
- const float yfac = minf(powf(hist->ymax, 2.0f), 1.0f) * 0.5f;
+ const float yfac = min_ff(powf(hist->ymax, 2.0f), 1.0f) * 0.5f;
hist->ymax += (dy * 0.1f) * yfac;
/* 0.1 allows us to see HDR colors up to 10 */
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index d1dee74c1b1..a09504fa4b7 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -831,7 +831,7 @@ static void ui_do_animate(const bContext *C, Panel *panel)
float fac;
fac = (PIL_check_seconds_timer() - data->starttime) / ANIMATION_TIME;
- fac = minf(sqrt(fac), 1.0f);
+ fac = min_ff(sqrt(fac), 1.0f);
/* for max 1 second, interpolate positions */
if (uiAlignPanelStep(sa, ar, fac, 0)) {
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index b9036db74a1..afa8c9051b2 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2396,7 +2396,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
* on the first item */
offset[0] = 0;
for (bt = block->buttons.first; bt; bt = bt->next)
- offset[0] = mini(offset[0], -(bt->rect.xmin + 0.8f * BLI_rctf_size_x(&bt->rect)));
+ offset[0] = min_ii(offset[0], -(bt->rect.xmin + 0.8f * BLI_rctf_size_x(&bt->rect)));
offset[1] = 1.5 * UI_UNIT_Y;
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index f793d71458e..e79c311c3ee 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -345,7 +345,7 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
const int vnum = ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT)) == (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT) ||
(roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) == (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2;
- minsize = mini(BLI_rcti_size_x(rect) * hnum,
+ minsize = min_ii(BLI_rcti_size_x(rect) * hnum,
BLI_rcti_size_y(rect) * vnum);
if (2.0f * rad > minsize)
@@ -491,7 +491,7 @@ static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, cha
float centx, centy, sizex, sizey, minsize;
int a, i1 = 0, i2 = 1;
- minsize = mini(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect));
+ minsize = min_ii(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect));
/* center position and size */
centx = (float)rect->xmin + 0.5f * minsize;
@@ -526,7 +526,7 @@ static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize
float centx, centy, sizex, sizey, minsize;
int a, i1 = 0, i2 = 1;
- minsize = mini(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect));
+ minsize = min_ii(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect));
/* center position and size */
centx = (float)rect->xmin + 0.5f * minsize;
@@ -1895,7 +1895,7 @@ void ui_hsvcircle_vals_from_pos(float *val_rad, float *val_dist, const rcti *rec
/* duplication of code... well, simple is better now */
const float centx = BLI_rcti_cent_x_fl(rect);
const float centy = BLI_rcti_cent_y_fl(rect);
- const float radius = (float)mini(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)) / 2.0f;
+ const float radius = (float)min_ii(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)) / 2.0f;
const float m_delta[2] = {mx - centx, my - centy};
const float dist_squared = len_squared_v2(m_delta);
@@ -1910,7 +1910,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, const rcti *
const float centx = BLI_rcti_cent_x_fl(rect);
const float centy = BLI_rcti_cent_y_fl(rect);
- float radius = (float)mini(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)) / 2.0f;
+ float radius = (float)min_ii(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)) / 2.0f;
/* gouraud triangle fan */
const float *hsv_ptr = ui_block_hsv_get(but->block);
@@ -2423,7 +2423,7 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
if (rect1.xmax > rect->xmax) {
rect1.xmax = rect->xmax;
- rect1.xmin = maxi(rect1.xmax - min, rect->xmin);
+ rect1.xmin = max_ii(rect1.xmax - min, rect->xmin);
}
}
}
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 87da31ceaee..48a1f8bf0f3 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1243,16 +1243,16 @@ static float smooth_view_rect_to_fac(const rctf *rect_a, const rctf *rect_b)
for (i = 0; i < 2; i++) {
/* axis translation normalized to scale */
- tfac = fabsf(cent_a[i] - cent_b[i]) / minf(size_a[i], size_b[i]);
- fac_max = maxf(fac_max, tfac);
+ tfac = fabsf(cent_a[i] - cent_b[i]) / min_ff(size_a[i], size_b[i]);
+ fac_max = max_ff(fac_max, tfac);
if (fac_max >= 1.0f) break;
/* axis scale difference, x2 so doubling or half gives 1.0f */
- tfac = (1.0f - (minf(size_a[i], size_b[i]) / maxf(size_a[i], size_b[i]))) * 2.0f;
- fac_max = maxf(fac_max, tfac);
+ tfac = (1.0f - (min_ff(size_a[i], size_b[i]) / max_ff(size_a[i], size_b[i]))) * 2.0f;
+ fac_max = max_ff(fac_max, tfac);
if (fac_max >= 1.0f) break;
}
- return minf(fac_max, 1.0f);
+ return min_ff(fac_max, 1.0f);
}
/* will start timer if appropriate */