parent
7be0ade7ce
commit
050a3d3112
|
@ -59,7 +59,13 @@
|
|||
- (void)updateToolTip
|
||||
{
|
||||
double value = [self doubleValue];
|
||||
double volume = linearToLogarithmic(value, MAX_VOLUME);
|
||||
BOOL volumeLimit = [[[NSUserDefaultsController sharedUserDefaultsController] defaults] boolForKey:@"volumeLimit"];
|
||||
double volume;
|
||||
if (volumeLimit) {
|
||||
volume = (value - self.minValue) * (MAX_VOLUME / (self.maxValue - self.minValue));
|
||||
} else {
|
||||
volume = linearToLogarithmic(value, MAX_VOLUME);
|
||||
}
|
||||
|
||||
NSString *text = [NSString stringWithFormat:@"%0.lf%%", volume];
|
||||
|
||||
|
|
Loading…
Reference in New Issue