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>2018-06-15 21:09:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-15 21:11:35 +0300
commite3d88b021c07dc9e864c55d766b305d7d3b8efb8 (patch)
tree65ecffa8cd3a9c3f071dc96be30ecf6d54f49b34 /source/blender/draw/intern/draw_common.c
parent2291ce9f1f59d10a10badf77c3b1ff75dddc8336 (diff)
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.
Diffstat (limited to 'source/blender/draw/intern/draw_common.c')
-rw-r--r--source/blender/draw/intern/draw_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index f32dc5fadaa..4bcbb2110e7 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -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);