* Fix look of position time field to match the rest of the UI. * Fix typo. * Improve position time display. * Add days, hours support to position time display. * Fix "Current Time" toolbar item geometry/layout. * Don’t enforce leading double-digits in position time display. * MainMenu.xib touched by Xcode. * Implement and use MonospacedDigitTextFieldCell. This way the digits of numbers in playlist columns consisting of mostly digits will be aligned vertically. * Disable font scaling code without effect. * Set "Current Time" toolbar item to use MonospacedDigitTextFieldCell. * Improve SecondsFormatter. * Merge in SecondsFormatter improvements from Play. * Move formatter setup into XIB. * Add CogTests. These can later be used for integration tests. * Add SecondsFormatterTests. Tests are stubbed out. * Pouring foundation for SecondsFormatterTests. * Implement -testPositive. * Replace unsigned with int in SecondsFormatter. * Implement negative support, tests. * Rewrite SecondsFormatter in preparation for better readability.. * Rewrite SecondsFormatter for better readability. * Add negative zero support. * Improve SecondsFormatter readability. * Refactor into -stringForTimeInterval: in SecondsFormatter. * Cleanup. * Mark TimeField as space-indented. * Replace custom time formatting code in TimeField with SecondsFormatter. * Cleanup. * Improve SecondsFormatter format strings. * Add internal type for time calculations. Co-authored-by: Jan Weiß <jan@geheimwerk.de>
35 lines
611 B
Objective-C
35 lines
611 B
Objective-C
//
|
|
// PositionSlider.m
|
|
// Cog
|
|
//
|
|
// Created by Vincent Spader on 2/22/09.
|
|
// Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import "PositionSlider.h"
|
|
#import "TimeField.h"
|
|
|
|
@implementation PositionSlider
|
|
|
|
- (void)setDoubleValue:(double)value
|
|
{
|
|
self.positionTextField.currentTime = value;
|
|
|
|
[super setDoubleValue:value];
|
|
}
|
|
|
|
- (void)setMaxValue:(double)value
|
|
{
|
|
self.positionTextField.duration = value;
|
|
|
|
[super setMaxValue:value];
|
|
}
|
|
|
|
- (void)mouseDragged:(NSEvent *)theEvent
|
|
{
|
|
self.positionTextField.currentTime = [self doubleValue];
|
|
|
|
[super mouseDragged:theEvent];
|
|
}
|
|
|
|
@end
|