Edit Mesh: tweak vertex size & edge width

- Vertex size now matches the theme setting.
- Edge width is closer to a single pixel line.
- Face dot was scaled up to be drawn as a circle,
  but is currently a square.
This commit is contained in:
2018-06-15 20:09:38 +02:00
parent 2291ce9f1f
commit e3d88b021c
2 changed files with 4 additions and 4 deletions

View File

@@ -120,8 +120,8 @@ void DRW_globals_update(void)
ts.sizeLampCircleShadow = ts.sizeLampCircle + U.pixelsize * 3.0f;
/* M_SQRT2 to be at least the same size of the old square */
ts.sizeVertex = ceilf(UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f);
ts.sizeFaceDot = ceilf(UI_GetThemeValuef(TH_FACEDOT_SIZE) * (float)M_SQRT2);
ts.sizeVertex = max_ff(1.0f, UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f);
ts.sizeFaceDot = UI_GetThemeValuef(TH_FACEDOT_SIZE);
ts.sizeEdge = 1.0f / 2.0f; /* TODO Theme */
ts.sizeEdgeFix = 0.5f + 2.0f * (2.0f * (MAX2(ts.sizeVertex, ts.sizeEdge)) * (float)M_SQRT1_2);

View File

@@ -47,7 +47,7 @@ out vec4 FragColor;
/* Vertex flag is shifted and combined with the edge flag */
#define FACE_ACTIVE (1 << (2 + 8))
#define LARGE_EDGE_SIZE 3.0
#define LARGE_EDGE_SIZE 2.0
/* Style Parameters in pixel */
@@ -154,7 +154,7 @@ void main()
/* Inner thin edge */
float innerEdge = e[v] - sizeEdge;
#ifdef ANTI_ALIASING
innerEdge += 0.125;
innerEdge += 0.4;
#endif
#ifdef VERTEX_SELECTION