Skip to content

Commit

Permalink
Actually change font size
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Sep 29, 2012
1 parent 344f3ea commit 2f9bd70
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Classes/CDIAddListTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
_textField = [[SSTextField alloc] initWithFrame:CGRectZero];
_textField.textColor = [UIColor cheddarTextColor];
_textField.placeholderTextColor = [UIColor cheddarLightTextColor];
_textField.font = [UIFont cheddarFontOfSize:20.0f];
_textField.font = [UIFont cheddarFontOfSize:18.0f];
_textField.backgroundColor = [UIColor whiteColor];
_textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
_textField.returnKeyType = UIReturnKeyDone;
Expand Down
2 changes: 1 addition & 1 deletion Classes/CDIAddTaskAnimationView.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (void)animationToPoint:(CGPoint)point height:(CGFloat)height insertTask:(void(
checkbox.frame = frame;

label.frame = CGRectMake(44.0f, 13.0f, size.width - 54.0f, 24.0f);
label.font = [UIFont cheddarFontOfSize:20.0f];
label.font = [UIFont cheddarFontOfSize:18.0f];

frame = container.frame;
frame.origin.y += 20.0f;
Expand Down
2 changes: 1 addition & 1 deletion Classes/CDILoadingView.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ @implementation CDILoadingView

- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
self.textLabel.font = [UIFont cheddarFontOfSize:16.0f];
self.textLabel.font = [UIFont cheddarInterfaceFontOfSize:16.0f];
self.backgroundColor = [UIColor clearColor];
}
return self;
Expand Down
5 changes: 2 additions & 3 deletions Classes/CDISettingsTextSizePickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ @implementation CDISettingsTextSizePickerViewController
+ (CGFloat)fontSizeAdjustment {
NSString *key = [self selectedKey];
if ([key isEqualToString:kCDITextSizeSmallKey]) {
return -4.0f;
return -3.0f;
} if ([key isEqualToString:kCDITextSizeLargeKey]) {
return 4.0f;
}
Expand Down Expand Up @@ -68,8 +68,7 @@ - (void)viewDidLoad {
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];

NSString *key = [[self keys] objectAtIndex:indexPath.row];
cell.textLabel.font = [UIFont cheddarFontOfSize:18.0f fontKey:key];
cell.textLabel.font = [UIFont cheddarInterfaceFontOfSize:18.0f];
cell.textLabel.textColor = [UIColor cheddarTextColor];

return cell;
Expand Down
2 changes: 1 addition & 1 deletion Classes/CDITableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ - (void)prepareForReuse {

- (void)updateFonts {
_textField.font = self.textLabel.font;
self.textLabel.font = [UIFont cheddarFontOfSize:20.0f];
self.textLabel.font = [UIFont cheddarFontOfSize:18.0f];
}


Expand Down
2 changes: 1 addition & 1 deletion Classes/CDITableViewCellDeleteConfirmationControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (void)drawRectCustom:(CGRect)rect {
[[image stretchableImageWithLeftCapWidth:5 topCapHeight:0] drawInRect:rect];

NSString *text = [self valueForKey:@"title"];
UIFont *font = [UIFont cheddarFontOfSize:15.0f];
UIFont *font = [UIFont cheddarInterfaceFontOfSize:15.0f];
UILineBreakMode lineBreakMode = UILineBreakModeClip;
UITextAlignment alignment = UITextAlignmentCenter;

Expand Down
4 changes: 2 additions & 2 deletions Classes/CDITaskTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ + (CGFloat)cellHeightForTask:(CDKTask *)task width:(CGFloat)width {
label = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];
label.numberOfLines = 0;
});
label.font = [UIFont cheddarFontOfSize:20.0f];
label.font = [UIFont cheddarFontOfSize:18.0f];
label.text = task.attributedDisplayText;
CGSize size = [label sizeThatFits:CGSizeMake(width - 54.0f, 2000.0f)];
label.text = nil;
Expand Down Expand Up @@ -137,7 +137,7 @@ - (void)prepareForReuse {

- (void)updateFonts {
[super updateFonts];
_attributedLabel.font = [UIFont cheddarFontOfSize:20.0f];
_attributedLabel.font = [UIFont cheddarFontOfSize:18.0f];
[self _updateAttributedText];
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/CDIUpgradeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ - (void)viewDidLoad {
TTTAttributedLabel *label = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(20.0f, 10.0f, width - 40.0f, 300.0f)];
label.autoresizingMask = UIViewAutoresizingFlexibleWidth;
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont cheddarFontOfSize:18.0f];
label.font = [UIFont cheddarInterfaceFontOfSize:18.0f];
label.numberOfLines = 0;
label.textColor = [UIColor cheddarTextColor];
label.verticalAlignment = TTTAttributedLabelVerticalAlignmentTop;
Expand Down
4 changes: 3 additions & 1 deletion Classes/CDKTask+CheddariOSAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "CDKTask+CheddariOSAdditions.h"
#import "CDISettingsTextSizePickerViewController.h"
#import "UIFont+CheddariOSAdditions.h"
#import "TTTAttributedLabel.h"

Expand All @@ -21,7 +22,8 @@ - (NSAttributedString *)attributedDisplayText {

NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.displayText];
NSString *fontName = [UIFont cheddarFontNameForStyle:kCDIFontRegularKey];
CTFontRef regularFont = CTFontCreateWithName((__bridge CFStringRef)fontName, 20.0f, NULL);
CGFloat fontSize = 18.0f + [CDISettingsTextSizePickerViewController fontSizeAdjustment];
CTFontRef regularFont = CTFontCreateWithName((__bridge CFStringRef)fontName, fontSize, NULL);
if (regularFont) {
[attributedString addAttribute:(__bridge NSString *)kCTFontAttributeName value:(__bridge id)regularFont range:NSMakeRange(0, self.displayText.length)];
}
Expand Down
8 changes: 4 additions & 4 deletions Classes/UIButton+CheddariOSAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ + (UIButton *)cheddarBigButton {
[button setTitleColor:[UIColor colorWithRed:0.384 green:0.412 blue:0.455 alpha:1] forState:UIControlStateNormal];
[button setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateNormal];
button.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
button.titleLabel.font = [UIFont cheddarFontOfSize:18.0f];
button.titleLabel.font = [UIFont cheddarInterfaceFontOfSize:18.0f];
return button;
}

Expand All @@ -30,7 +30,7 @@ + (UIButton *)cheddarBigOrangeButton {
[button setBackgroundImage:[[UIImage imageNamed:@"big-orange-button-highlighted"] stretchableImageWithLeftCapWidth:5 topCapHeight:0] forState:UIControlStateHighlighted];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button setTitleShadowColor:[UIColor colorWithWhite:0.0f alpha:0.2f] forState:UIControlStateNormal];
button.titleLabel.font = [UIFont cheddarFontOfSize:20.0f];
button.titleLabel.font = [UIFont cheddarInterfaceFontOfSize:20.0f];
button.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
button.titleEdgeInsets = UIEdgeInsetsMake(-1.0f, 0.0f, 0.0f, 0.0f);
return button;
Expand All @@ -43,7 +43,7 @@ + (UIButton *)cheddarBigGrayButton {
[button setBackgroundImage:[[UIImage imageNamed:@"big-gray-button-highlighted"] stretchableImageWithLeftCapWidth:5 topCapHeight:0] forState:UIControlStateHighlighted];
[button setTitleColor:[UIColor cheddarSteelColor] forState:UIControlStateNormal];
[button setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateNormal];
button.titleLabel.font = [UIFont cheddarFontOfSize:20.0f];
button.titleLabel.font = [UIFont cheddarInterfaceFontOfSize:20.0f];
button.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
button.titleEdgeInsets = UIEdgeInsetsMake(-1.0f, 0.0f, 0.0f, 0.0f);
return button;
Expand All @@ -56,7 +56,7 @@ + (UIButton *)cheddarBarButton {
[button setTitleShadowColor:[UIColor colorWithWhite:0.0f alpha:0.2f] forState:UIControlStateNormal];
[button setBackgroundImage:[[UIImage imageNamed:@"nav-button"] stretchableImageWithLeftCapWidth:6 topCapHeight:0] forState:UIControlStateNormal];
[button setBackgroundImage:[[UIImage imageNamed:@"nav-button-highlighted"] stretchableImageWithLeftCapWidth:6 topCapHeight:0] forState:UIControlStateHighlighted];
button.titleLabel.font = [UIFont cheddarFontOfSize:14.0f];
button.titleLabel.font = [UIFont cheddarInterfaceFontOfSize:14.0f];
button.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
// button.titleEdgeInsets = UIEdgeInsetsMake(-1.0f, 0.0f, 0.0f, 0.0f);
return button;
Expand Down

0 comments on commit 2f9bd70

Please sign in to comment.