[Bf-blender-cvs] [a758dce0fa7] master: UI: Graph Editor Dot Scaling

Harley Acheson noreply at git.blender.org
Tue Aug 27 17:05:33 CEST 2019


Commit: a758dce0fa784cb1d8027101784f8c6280512bad
Author: Harley Acheson
Date:   Tue Aug 27 08:04:06 2019 -0700
Branches: master
https://developer.blender.org/rBa758dce0fa784cb1d8027101784f8c6280512bad

UI: Graph Editor Dot Scaling

Scale Graph Editor keyframe dots and handles based on Resolution Scale rather than Line Width.

Differential Revision: https://developer.blender.org/D5600

Reviewed by Brecht Van Lommel

===================================================================

M	source/blender/editors/space_graph/graph_draw.c

===================================================================

diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index e7ba498fc11..e18a440f7c0 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -205,7 +205,7 @@ static void draw_fcurve_keyframe_vertices(FCurve *fcu, View2D *v2d, bool edit, u
 {
   immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
 
-  immUniform1f("size", UI_GetThemeValuef(TH_VERTEX_SIZE) * U.pixelsize);
+  immUniform1f("size", UI_GetThemeValuef(TH_VERTEX_SIZE) * U.dpi_fac);
 
   draw_fcurve_selected_keyframe_vertices(fcu, v2d, edit, false, pos);
   draw_fcurve_selected_keyframe_vertices(fcu, v2d, edit, true, pos);
@@ -269,8 +269,8 @@ static void draw_fcurve_handle_vertices(FCurve *fcu,
   immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA);
 
   /* set handle size */
-  immUniform1f("size", (1.4f * UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE)) * U.pixelsize);
-  immUniform1f("outlineWidth", 1.5f * U.pixelsize);
+  immUniform1f("size", (1.4f * UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE)) * U.dpi_fac);
+  immUniform1f("outlineWidth", 1.5f * U.dpi_fac);
 
   draw_fcurve_selected_handle_vertices(fcu, v2d, false, sel_handle_only, pos);
   draw_fcurve_selected_handle_vertices(fcu, v2d, true, sel_handle_only, pos);



More information about the Bf-blender-cvs mailing list