diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-08-04 22:56:43 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-08-04 22:56:43 +0300 |
commit | d39e18853ff2fd1aa0f54c289a2930c36602323e (patch) | |
tree | 5a1b57be81d119c1b9e6540ea49ff1009b3cf618 /source/blender/editors | |
parent | c18e6fd87cdc1a7d07dfcaaab726a67eb81f493f (diff) |
Nodes: Link lines & link arrows not scaling to DPI/pixelsize correctly
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index e7042b20152..cb4ae699454 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3411,7 +3411,7 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa #define LINK_RESOL 24 #define LINK_ARROW 12 /* position of arrow on the link, LINK_RESOL/2 */ -#define ARROW_SIZE 7 +#define ARROW_SIZE (7 * UI_DPI_FAC) void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, bool do_shaded, int th_col2, bool do_triple, int th_col3) { @@ -3424,6 +3424,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, /* store current linewidth */ float linew; float arrow[2], arrow1[2], arrow2[2]; + const float px_fac = UI_DPI_WINDOW_FAC; glGetFloatv(GL_LINE_WIDTH, &linew); /* we can reuse the dist variable here to increment the GL curve eval amount*/ @@ -3450,7 +3451,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, } if (do_triple) { UI_ThemeColorShadeAlpha(th_col3, -80, -120); - glLineWidth(4.0f); + glLineWidth(4.0f * px_fac); glBegin(GL_LINE_STRIP); for (i = 0; i <= LINK_RESOL; i++) { @@ -3471,7 +3472,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, * for Intel hardware, this breaks with GL_LINE_STRIP and * changing color in begin/end blocks. */ - glLineWidth(1.5f); + glLineWidth(1.5f * px_fac); if (do_shaded) { glBegin(GL_LINES); for (i = 0; i < LINK_RESOL; i++) { |