Browse Source

Minor adjustments.

v1.2.4
Abhishek Banthia 9 years ago
parent
commit
ecfa2f85e5
  1. 2
      Clocker/Custom Table Cell Views/CLTimezoneCellView.h
  2. 8
      Clocker/Custom Table Cell Views/CLTimezoneCellView.m

2
Clocker/Custom Table Cell Views/CLTimezoneCellView.h

@ -19,7 +19,7 @@
- (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell; - (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell;
- (void)setUpAutoLayoutWithCell:(CLTimezoneCellView *)cell; - (void)setUpAutoLayoutWithCell;
- (void)setAppropriateFont; - (void)setAppropriateFont;
@end @end

8
Clocker/Custom Table Cell Views/CLTimezoneCellView.m

@ -156,13 +156,13 @@
} }
} }
- (void)setUpAutoLayoutWithCell:(CLTimezoneCellView *)cell - (void)setUpAutoLayoutWithCell
{ {
CGFloat width = [cell.relativeDate.stringValue CGFloat width = [self.relativeDate.stringValue
sizeWithAttributes: @{NSFontAttributeName:cell.relativeDate.font}].width; sizeWithAttributes: @{NSFontAttributeName:self.relativeDate.font}].width;
[cell.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) { [self.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) {
if (constraint.constant > 20) if (constraint.constant > 20)
{ {
constraint.constant = width+8; constraint.constant = width+8;

Loading…
Cancel
Save