|
@@ -157,7 +157,7 @@
|
|
|
// Back Button
|
|
|
if ([_serverUrl isEqualToString:[CCUtility getHomeServerUrlActiveUrl:appDelegate.activeUrl]]) {
|
|
|
|
|
|
- UIImage *backButtonImage = [UIImage imageNamed:@"themingLogo"];
|
|
|
+ UIImage *backButtonImage = [self getImageLogoHome];
|
|
|
backButtonImage = [backButtonImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
|
|
|
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithImage:backButtonImage style:UIBarButtonItemStylePlain target:nil action:nil];
|
|
@@ -561,45 +561,11 @@
|
|
|
// we are in home : LOGO BRAND
|
|
|
if ([_serverUrl isEqualToString:[CCUtility getHomeServerUrlActiveUrl:appDelegate.activeUrl]]) {
|
|
|
|
|
|
- UIImage *imageThemingLogo = [UIImage imageNamed:@"themingLogo"];
|
|
|
+ self.navigationItem.title = nil;
|
|
|
+
|
|
|
_imageTitleHome = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 30)]; // IMAGE = 120 x 60
|
|
|
_imageTitleHome.contentMode = UIViewContentModeScaleAspectFill;
|
|
|
- //_imageTitleHome.clipsToBounds = YES;
|
|
|
- NSInteger multiplierImageTitleHome = 2;
|
|
|
-
|
|
|
- NSString *fileNameThemingLogo = [NSString stringWithFormat:@"%@/%@-themingLogo.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl]];
|
|
|
- UIImage *image = [UIImage imageWithContentsOfFile:fileNameThemingLogo];
|
|
|
- if (image != nil) {
|
|
|
- imageThemingLogo = image;
|
|
|
- multiplierImageTitleHome = 1;
|
|
|
- }
|
|
|
-
|
|
|
- self.navigationItem.title = nil;
|
|
|
-
|
|
|
- if ([NCBrandOptions sharedInstance].use_themingColor) {
|
|
|
-
|
|
|
- if ([appDelegate.reachability isReachable] == NO) {
|
|
|
-
|
|
|
- _imageTitleHome.image = [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplierImageTitleHome color:[NCBrandColor sharedInstance].icon];
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
|
|
|
-
|
|
|
- if ([capabilities.themingColor isEqualToString:@"#FFFFFF"])
|
|
|
- _imageTitleHome.image = [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplierImageTitleHome color:[UIColor blackColor]];
|
|
|
- else
|
|
|
- _imageTitleHome.image = [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplierImageTitleHome color:[UIColor whiteColor]];
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- if ([appDelegate.reachability isReachable] == NO)
|
|
|
- _imageTitleHome.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"themingLogo"] multiplier:multiplierImageTitleHome color:[NCBrandColor sharedInstance].icon];
|
|
|
- else
|
|
|
- _imageTitleHome.image = [UIImage imageNamed:@"themingLogo"];
|
|
|
- }
|
|
|
-
|
|
|
+ _imageTitleHome.image = [self getImageLogoHome];
|
|
|
|
|
|
[_imageTitleHome setUserInteractionEnabled:YES];
|
|
|
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(menuLogo:)];
|
|
@@ -628,6 +594,43 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (UIImage *)getImageLogoHome
|
|
|
+{
|
|
|
+ UIImage *imageThemingLogo = [UIImage imageNamed:@"themingLogo"];
|
|
|
+ NSInteger multiplier = 2;
|
|
|
+
|
|
|
+ NSString *fileNameThemingLogo = [NSString stringWithFormat:@"%@/%@-themingLogo.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl]];
|
|
|
+ UIImage *image = [UIImage imageWithContentsOfFile:fileNameThemingLogo];
|
|
|
+ if (image != nil) {
|
|
|
+ imageThemingLogo = image;
|
|
|
+ multiplier = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ([NCBrandOptions sharedInstance].use_themingColor) {
|
|
|
+
|
|
|
+ if ([appDelegate.reachability isReachable] == NO) {
|
|
|
+
|
|
|
+ return [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplier color:[NCBrandColor sharedInstance].icon];
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
|
|
|
+
|
|
|
+ if ([capabilities.themingColor isEqualToString:@"#FFFFFF"])
|
|
|
+ return [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplier color:[UIColor blackColor]];
|
|
|
+ else
|
|
|
+ return [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplier color:[UIColor whiteColor]];
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ if ([appDelegate.reachability isReachable] == NO)
|
|
|
+ return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"themingLogo"] multiplier:multiplier color:[NCBrandColor sharedInstance].icon];
|
|
|
+ else
|
|
|
+ return [UIImage imageNamed:@"themingLogo"];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
- (void)setUINavigationBarDefault
|
|
|
{
|
|
|
[appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
|