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:
authorMike Erwin <significant.bit@gmail.com>2016-11-15 04:04:59 +0300
committerMike Erwin <significant.bit@gmail.com>2016-11-15 04:27:54 +0300
commit665aa6a2a0c672f43da55daddcc4fb4db09e78b1 (patch)
tree8ef2c45c18f71a84a9a93449cb8d34707bee25b8 /source/blender/editors/space_view3d/view3d_ruler.c
parent8859aa38281803932fbd15039d313bd50da277fa (diff)
blender 2.8: Opengl: UI_draw_roundbox
all is in the title too.. Reviewers: merwin Reviewed By: merwin Subscribers: Blendify, Severin Tags: #bf_blender_2.8, #opengl_gfx Maniphest Tasks: T49043 Differential Revision: https://developer.blender.org/D2337
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_ruler.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 3c13ab9d595..bed2df68abe 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -429,9 +429,9 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
//unsigned int color_act = 0x666600;
unsigned int color_act = 0xffffff;
unsigned int color_base = 0x0;
- unsigned char color_back[4] = {0xff, 0xff, 0xff, 0x80};
unsigned char color_text[3];
unsigned char color_wire[3];
+ float color_back[4] = {1.0f, 1.0f, 1.0f, 0.5f};
/* anti-aliased lines for more consistent appearance */
glEnable(GL_LINE_SMOOTH);
@@ -530,12 +530,11 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
pos[1] = co_ss[1][1] - (numstr_size[1] / 2.0f);
/* draw text (bg) */
- glColor4ubv(color_back);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox(
pos[0] - bg_margin, pos[1] - bg_margin,
pos[0] + bg_margin + numstr_size[0], pos[1] + bg_margin + numstr_size[1],
- bg_radius);
+ bg_radius, color_back);
/* draw text */
glColor3ubv(color_text);
BLF_position(blf_mono_font, pos[0], pos[1], 0.0f);
@@ -620,11 +619,10 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
pos[1] -= numstr_size[1] / 2.0f;
/* draw text (bg) */
- glColor4ubv(color_back);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox(pos[0] - bg_margin, pos[1] - bg_margin,
pos[0] + bg_margin + numstr_size[0], pos[1] + bg_margin + numstr_size[1],
- bg_radius);
+ bg_radius, color_back);
/* draw text */
glColor3ubv(color_text);
BLF_position(blf_mono_font, pos[0], pos[1], 0.0f);