Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Add custom colors config
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseInfinity committed Feb 26, 2015
1 parent 8779f44 commit 087ceed
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Classes/CategoriesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte
break;
case ConfigDripAssist:
frame = self.navigationItem.titleView.frame;
frame.size.width = 0.0;
frame.size.height = 0.0;
frame.size.width = 257.0;
frame.size.height = 30.0;
self.navigationItem.titleView.frame = frame;
break;
/*EAOLandscapeResize*/
Expand Down Expand Up @@ -376,8 +376,8 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte
break;
case ConfigDripAssist:
frame = self.navigationItem.titleView.frame;
frame.size.width = 0.0;
frame.size.height = 0.0;
frame.size.width = 157.0;
frame.size.height = 40.0;
self.navigationItem.titleView.frame = frame;
break;
/*EAOPortraitResize*/
Expand Down
18 changes: 16 additions & 2 deletions Classes/Config.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ - (void)setSite:(NSInteger)theSite {
answersEnabled = NO;
collectionsEnabled = NO;
self.store = nil;
self.private = NO;
self.private = YES;
self.scanner = NO;
break;
/*EAOOptions*/
Expand Down Expand Up @@ -160,7 +160,7 @@ - (void)setSite:(NSInteger)theSite {
self.introCSS = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"make_intro" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
self.stepCSS = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"make_step" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
break;
// MJ Trim
// Config Magnolia
case ConfigMagnolia:
self.textColor = [UIColor blackColor];
self.backgroundColor = [UIColor whiteColor];
Expand All @@ -185,6 +185,20 @@ - (void)setSite:(NSInteger)theSite {
? [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"category_more_info_ipad" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil]
: [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"category_more_info_iphone" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
break;

case ConfigDripAssist:
self.backgroundColor = [UIColor blackColor];
self.textColor = [UIColor whiteColor];
self.toolbarColor = [UIColor colorWithRed:192.0f/255.0f green:192.0f/255.0f blue:192.0/255.0f alpha:1.0];
self.buttonColor = SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0") ? [UIColor colorWithRed:109.0f/255.0f green:109.0f/255.0f blue:109.0f/255.0f alpha:1.0] : self.toolbarColor;

// Load intro and step css from the css folder.
self.introCSS = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"ifixit_intro" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
self.stepCSS = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"ifixit_step" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
self.moreInfoCSS = ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
? [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"category_more_info_ipad" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil]
: [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"category_more_info_iphone" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
break;
default:
self.backgroundColor = [UIColor blackColor];
self.textColor = [UIColor whiteColor];
Expand Down
1 change: 1 addition & 0 deletions Classes/DetailGridViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ - (void)viewDidLoad {
break;
case ConfigDripAssist:
self.siteLogo.image = [UIImage imageNamed:@"dripassist_logo_transparent.png"];
self.siteLogo.frame = CGRectMake(60, 110, self.siteLogo.frame.size.width, self.siteLogo.frame.size.height);
[self.backgroundView addSubview:self.siteLogo];
break;
/*EAOiPadSiteLogo*/
Expand Down
2 changes: 1 addition & 1 deletion Classes/GuideIntroViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (void)viewDidLoad {
break;
case ConfigDripAssist:
image = [UIImage imageNamed:@"dripassist_logo_transparent.png"];
headerImageLogo.frame = CGRectMake(headerImageLogo.frame.origin.x, headerImageLogo.frame.origin.y, image.size.width, image.size.height);
headerImageLogo.frame = CGRectMake(headerImageLogo.frame.origin.x, headerImageLogo.frame.origin.y, image.size.width/1.5, image.size.height/1.5);
headerImageLogo.image = image;
break;
/*EAOGuideIntro*/
Expand Down

0 comments on commit 087ceed

Please sign in to comment.