diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-20 06:59:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-20 06:59:22 +0300 |
commit | 3bed4cbf2b4c09dcb62197b8a8c4ec4224abc8b7 (patch) | |
tree | fc800fc89f29db4ac9d951ff148b8424c8cb7c73 /source/blender/makesdna | |
parent | 17f37dceccb99d7eb58f7c29908eeb2bd87cd7ff (diff) |
fix [#25283] Edge length display difficult to read
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_text_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 8 |
3 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 4e41309cff4..853c123e5d7 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -153,9 +153,9 @@ typedef struct TFace { #define ME_DRAWSHARP (1 << 8) #define ME_DRAWBWEIGHTS (1 << 9) -#define ME_DRAW_EDGELEN (1 << 10) -#define ME_DRAW_FACEAREA (1 << 11) -#define ME_DRAW_EDGEANG (1 << 12) +#define ME_DRAWEXTRA_EDGELEN (1 << 10) +#define ME_DRAWEXTRA_FACEAREA (1 << 11) +#define ME_DRAWEXTRA_FACEANG (1 << 12) /* old global flags: #define G_DRAWEDGES (1 << 18) diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index d89d15fa302..82de3fc1833 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -48,7 +48,7 @@ typedef struct TextMarker { int lineno, start, end, pad1; /* line number and start/end character indices */ int group, flags; /* see BKE_text.h for flag defines */ - char color[4], pad[4]; /* draw color of the marker */ + unsigned char color[4], pad[4]; /* draw color of the marker */ } TextMarker; typedef struct Text { diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 5290a353580..f9ba1c2a471 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -88,6 +88,7 @@ typedef struct uiFontStyle { /* this is fed to the layout engine and widget code */ + typedef struct uiStyle { struct uiStyle *next, *prev; @@ -158,13 +159,13 @@ typedef struct ThemeSpace { /* main window colors */ char back[4]; char title[4]; - char text[4]; + char text[4]; char text_hi[4]; /* header colors */ char header[4]; char header_title[4]; - char header_text[4]; + char header_text[4]; char header_text_hi[4]; /* button/tool regions */ @@ -176,7 +177,7 @@ typedef struct ThemeSpace { /* listview regions */ char list[4]; char list_title[4]; - char list_text[4]; + char list_text[4]; char list_text_hi[4]; /* float panel */ @@ -199,6 +200,7 @@ typedef struct ThemeSpace { char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4]; char face[4], face_select[4]; // solid faces char face_dot[4]; // selected color + char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4]; char normal[4]; char vertex_normal[4]; char bone_solid[4], bone_pose[4]; |