Make sure all single timeline entries are fully drawn
Fixes: 257823844
Test: Load a trace and see if the expanded timeline renders all entries as boxes
Change-Id: I184994ecd364a0be7c7cc52d540745339f742b8e
diff --git a/tools/winscope-ng/src/app/colors.ts b/tools/winscope-ng/src/app/colors.ts
index 891fedf..25283ca 100644
--- a/tools/winscope-ng/src/app/colors.ts
+++ b/tools/winscope-ng/src/app/colors.ts
@@ -20,4 +20,5 @@
ACTIVE_POINTER = "#1967D2",
GUIDE_BAR = "#3C4043",
GUIDE_BAR_LIGHT = "#9AA0A6",
+ ACTIVE_BORDER = ACTIVE_POINTER,
}
\ No newline at end of file
diff --git a/tools/winscope-ng/src/app/components/timeline/single_timeline.component.ts b/tools/winscope-ng/src/app/components/timeline/single_timeline.component.ts
index 73b979a..536d7f3 100644
--- a/tools/winscope-ng/src/app/components/timeline/single_timeline.component.ts
+++ b/tools/winscope-ng/src/app/components/timeline/single_timeline.component.ts
@@ -15,6 +15,7 @@
*/
import { Component, ElementRef, EventEmitter, HostListener, Input, Output, SimpleChanges, ViewChild } from "@angular/core";
+import { Color } from "app/colors";
export type entry = bigint;
@@ -149,7 +150,7 @@
this.defineEntryPath(this.hoveringEntry);
this.ctx.globalAlpha = 1.0;
- this.ctx.strokeStyle = "#1967D2";
+ this.ctx.strokeStyle = Color.ACTIVE_BORDER;
this.ctx.lineWidth = 2;
this.ctx.save();
this.ctx.clip();
@@ -245,11 +246,12 @@
}
this.ctx.globalAlpha = 1.0;
-
this.defineEntryPath(this.selected, 1);
- this.ctx.strokeStyle = "#1967D2"; // colorShade(this.color, -30);
+ this.ctx.fillStyle = this.color;
+ this.ctx.strokeStyle = Color.ACTIVE_BORDER;
this.ctx.lineWidth = 3;
this.ctx.stroke();
+ this.ctx.fill();
this.ctx.restore();
}
@@ -259,8 +261,9 @@
function rect(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number) {
ctx.beginPath();
ctx.moveTo(x, y);
- ctx.lineTo(x + w, x);
- ctx.lineTo(x + w, h);
- ctx.lineTo(x, h);
+ ctx.lineTo(x + w, y);
+ ctx.lineTo(x + w, y + h);
+ ctx.lineTo(x, y + h);
+ ctx.lineTo(x, y);
ctx.closePath();
}
\ No newline at end of file