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:
authorCampbell Barton <ideasman42@gmail.com>2019-12-17 01:51:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-17 01:53:25 +0300
commit7e15638cceaf570995ebd7fcd719914885202ccc (patch)
treeaba1c9d0fada3bb4b55d8945c05224344a0263bb /source/blender/editors/space_image
parent96ebdbc90ff93f55e202997334ef3ff811f497fb (diff)
Cleanup: style, always use braces
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_draw.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 9a633427d82..3f563fe9033 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -549,12 +549,15 @@ static void draw_udim_label(ARegion *ar, float fx, float fy, const char *label)
int textwidth = BLF_width(blf_mono_font, label, strlen(label)) + 10;
float stepx = BLI_rcti_size_x(&ar->v2d.mask) / BLI_rctf_size_x(&ar->v2d.cur);
float opacity;
- if (textwidth < 0.5f * (stepx - 10))
+ if (textwidth < 0.5f * (stepx - 10)) {
opacity = 1.0f;
- else if (textwidth < (stepx - 10))
+ }
+ else if (textwidth < (stepx - 10)) {
opacity = 2.0f - 2.0f * (textwidth / (stepx - 10));
- else
+ }
+ else {
opacity = 0.0f;
+ }
BLF_color4ub(blf_mono_font, 220, 220, 220, 150 * opacity);
BLF_position(blf_mono_font, (int)(x + 10), (int)(y + 10), 0);
BLF_draw_ascii(blf_mono_font, label, strlen(label));