Skip to content

Commit

Permalink
fix axis tick color
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed Sep 24, 2024
1 parent d2ffa0b commit cc58c73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cargo/core/compiler/timings.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function render_pipeline_graph() {
// Canvas for hover highlights. This is a separate layer to improve performance.
const linectx = setup_canvas('pipeline-graph-lines', canvas_width, canvas_height);
linectx.clearRect(0, 0, canvas_width, canvas_height);

ctx.strokeStyle = TICK_COLOR;
// Draw Y tick marks.
for (let n=1; n<units.length; n++) {
const y = MARGIN + Y_TICK_DIST * n;
Expand All @@ -80,7 +80,7 @@ function render_pipeline_graph() {
// Draw Y labels.
ctx.textAlign = 'end';
ctx.textBaseline = 'middle';
ctx.fillStyle = TEXT_COLOR;
ctx.fillStyle = TICK_COLOR;
for (let n=0; n<units.length; n++) {
let y = MARGIN + Y_TICK_DIST * n + Y_TICK_DIST / 2;
ctx.fillText(n+1, X_LINE-4, y);
Expand Down Expand Up @@ -333,6 +333,7 @@ function draw_graph_axes(id, graph_height) {
ctx.lineWidth = 2;
ctx.font = '16px sans-serif';
ctx.textAlign = 'center';
ctx.strokeStyle = TICK_COLOR;

// Draw main axes.
ctx.beginPath();
Expand Down Expand Up @@ -364,7 +365,6 @@ function draw_graph_axes(id, graph_height) {
ctx.lineTo(x, MARGIN+graph_height);
ctx.stroke();
}
ctx.strokeStyle = TEXT_COLOR;
ctx.setLineDash([]);
return {canvas_width, canvas_height, graph_width, graph_height, ctx, px_per_sec};
}
Expand Down
3 changes: 3 additions & 0 deletions src/cargo/core/compiler/timings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,10 @@ static HTML_TMPL: &str = r#"
--table-td-background: #262626;
--table-td-border-right: #333;
--canvas-background: #1a1a1a;
--tick: #b0b0b0;
--grid: #333;
--dep-line: #444;
--dep-line-highlighted: #fff;
}
}
Expand Down

0 comments on commit cc58c73

Please sign in to comment.