Fix #138764: Draw weak grid lines on every second frame
Instead of drawing weak lines halfway between strong lines, they are drawn at every second strong line as gray lines, skipping one dark line. This means that lines are always drawn on full frames instead of sometimes landing in the middle. Co-authored-by: Adarsh TS <tsadarsh@pop-os.localdomain> Pull Request: https://projects.blender.org/blender/blender/pulls/139398
This commit is contained in:
committed by
Christoph Lendenfeld
parent
dc83260f1a
commit
05d0391ed6
@@ -252,8 +252,9 @@ static void view2d_draw_lines(const View2D *v2d,
|
||||
uchar minor_color[3];
|
||||
UI_GetThemeColorShade3ubv(TH_GRID, 16, minor_color);
|
||||
ParallelLinesSet minor_lines;
|
||||
minor_lines.distance = major_distance;
|
||||
minor_lines.offset = major_distance / 2.0f;
|
||||
/* Draw minor lines at every second major line. */
|
||||
minor_lines.distance = major_distance * 2.0f;
|
||||
minor_lines.offset = major_distance;
|
||||
view2d_draw_lines_internal(v2d, &minor_lines, minor_color, direction);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user