Skip to content

Commit 91b1cbd

Browse files
committed
Use a well for the network monitor graphs
1 parent 0c20a35 commit 91b1cbd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/networkMonitor.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,8 @@ namespace NetworkMonitor {
230230
width: w,
231231
height: h,
232232
onDraw: function (g) {
233-
g.stroke = 1;
234-
g.line(0, 0, this.width - 1, 0);
235-
g.line(this.width - 1, 0, this.width - 1, this.height);
236-
g.line(0, this.height - 1, this.width - 1, this.height - 1);
237-
g.line(0, 0, 0, this.height);
233+
g.colour = this.window?.colours[1] || 0;
234+
g.well(0, 0, this.width, this.height);
238235
g.clip(1, 1, this.width - 2, this.height - 2);
239236
drawGraph(g, this.width - 2, this.height - 2, kind);
240237
}
@@ -276,7 +273,7 @@ namespace NetworkMonitor {
276273
yOffset -= lineHeight;
277274
if (lineHeight > 0) {
278275
g.fill = categoryGroups[n].paletteIndex;
279-
g.fillRect(x, yOffset, barWidth, lineHeight);
276+
g.rect(x, yOffset, barWidth, lineHeight);
280277
}
281278
}
282279

0 commit comments

Comments
 (0)