@@ -222,11 +222,11 @@ - (void)drawRect:(NSRect)rect {
222222 // draw the battery bar
223223 [[appSettings graphFG1Color ] set ];
224224 if (self.batteryMiner .batteries .count ) {
225- percentRect.size .width = rect .size .width * ((float )[self .batteryMiner chargePercent ] / 100 .);
226-
225+ percentRect.size .width = bounds .size .width * ((float )[self .batteryMiner chargePercent ] / 100 .);
226+
227227 if ([self shouldDrawMiniGraph ]) {
228- percentRect.origin .y = self. bounds .origin .y ;
229- percentRect.size .height = self. bounds .size .height ;
228+ percentRect.origin .y = bounds.origin .y ;
229+ percentRect.size .height = bounds.size .height ;
230230 }
231231
232232 NSRectFill (percentRect);
@@ -237,7 +237,7 @@ - (void)drawRect:(NSRect)rect {
237237 if (powerStatus == XRGBatteryStatusCharging) {
238238 NSRect chargingRect = NSMakeRect (percentRect.origin .x + percentRect.size .width ,
239239 percentRect.origin .y ,
240- (rect .size .width - percentRect.size .width ) * ((float )tripleCount / 3 .),
240+ (bounds .size .width - percentRect.size .width ) * ((float )tripleCount / 3 .),
241241 percentRect.size .height );
242242
243243 NSRectFill (chargingRect);
@@ -247,8 +247,8 @@ - (void)drawRect:(NSRect)rect {
247247
248248 if (![self shouldDrawMiniGraph ]) {
249249 // Draw the watts bar
250- percentRect.origin .x = rect .size .width / 2 .;
251- percentRect.size .width = (rect .size .width / 2 .) * (fabs (currentWatts) / maxWatts);
250+ percentRect.origin .x = bounds .size .width / 2 .;
251+ percentRect.size .width = (bounds .size .width / 2 .) * (fabs (currentWatts) / maxWatts);
252252 if (currentWatts < 0 ) {
253253 percentRect.origin .x -= percentRect.size .width ;
254254 }
@@ -266,8 +266,8 @@ - (void)drawRect:(NSRect)rect {
266266 NSRectFill (percentRect);
267267
268268 // Fill the split bar for the amp graph
269- NSRectFill (NSMakeRect ((rect .size .width / 2 .) - 1 ., topOfGraph, 2 ., textRectHeight + 2 .));
270-
269+ NSRectFill (NSMakeRect ((bounds .size .width / 2 .) - 1 ., topOfGraph, 2 ., textRectHeight + 2 .));
270+
271271 // Draw the battery capacity graph, only if there is space for it on the graph.
272272 percentRect.size .width = graphSize.width ;
273273 percentRect.origin .y = 0 ;
0 commit comments