Skip to content

Commit f054d66

Browse files
committed
Correct the text drawing in the GPU graph.
1 parent 3123e02 commit f054d66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Graph Views/XRGGPUView.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ - (void)drawGraph {
172172
}
173173

174174
// Draw the text
175-
NSRect textRect = NSInsetRect(graphRect, 3, 0);
175+
NSRect textRect = [self paddedTextRect];
176176
CGFloat t = [(XRGDataSet *)totalValues[i] currentValue];
177177
CGFloat f = [(XRGDataSet *)freeValues[i] currentValue];
178178

@@ -227,9 +227,7 @@ - (void)drawGraph {
227227
self.centerLabel.stringValue = @"";
228228
self.rightLabel.stringValue = @"";
229229

230-
[leftText drawInRect:textRect withAttributes:[appSettings alignLeftAttributes]];
231-
[centerText drawInRect:textRect withAttributes:[appSettings alignCenterAttributes]];
232-
[rightText drawInRect:textRect withAttributes:[appSettings alignRightAttributes]];
230+
[self drawLeftText:leftText centerText:centerText rightText:rightText inRect:textRect];
233231
}
234232

235233
[gc setShouldAntialias:YES];

0 commit comments

Comments
 (0)