Marino Faggiana il y a 7 ans
Parent
commit
715921f592

+ 2 - 0
iOSClient/Activity/CCActivity.m

@@ -105,7 +105,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 - (void)didReceiveMemoryWarning {

+ 1 - 1
iOSClient/AppDelegate.m

@@ -204,7 +204,7 @@
     self.player.delegate = self;
     
     // Theming Color
-    [self settingThemingColor];
+    //[self settingThemingColor];
     
     // ico Image Cache
     self.icoImagesCache = [[NSMutableDictionary alloc] init];

+ 2 - 0
iOSClient/Favorites/CCFavorites.m

@@ -102,7 +102,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 - (void)triggerProgressTask:(NSNotification *)notification

+ 2 - 0
iOSClient/Local storage/CCLocalStorage.m

@@ -95,7 +95,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 3 - 0
iOSClient/Main/CCDetail.m

@@ -195,7 +195,10 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
+    self.tabBarController.tabBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
+    self.tabBarController.tabBar.tintColor = [NCBrandColor sharedInstance].brand;
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 15 - 0
iOSClient/Main/CCMain.m

@@ -114,6 +114,7 @@
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(clearDateReadDataSource:) name:@"clearDateReadDataSource" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setTitle) name:@"setTitleMain" object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(triggerProgressTask:) name:@"NotificationProgressTask" object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
     }
     
     return self;
@@ -309,6 +310,17 @@
     }
 }
 
+- (void)changeTheming
+{
+    // Navigation & TabBar color
+    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:_isFolderEncrypted online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
+    
+    // Menu e Bar
+    [self createReMainMenu];
+    [self createReSelectMenu];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Initizlize Mail =====
 #pragma --------------------------------------------------------------------------------------------
@@ -359,6 +371,9 @@
         // populate shared Link & User variable
         [CCCoreData populateSharesVariableFromDBActiveAccount:app.activeAccount sharesLink:app.sharesLink sharesUserAndGroup:app.sharesUserAndGroup];
 
+        // Setting Theming
+        [app settingThemingColor];
+        
         // Load Datasource
         [self reloadDatasource:_serverUrl fileID:nil selector:nil];
 

+ 2 - 0
iOSClient/Main/CCMore.swift

@@ -207,7 +207,9 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     
     func changeTheming() {
         
+        // Navigation & TabBar color
         appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, encrypted: false, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
     }
     
     func numberOfSections(in tableView: UITableView) -> Int {

+ 2 - 0
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -109,7 +109,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 0 - 6
iOSClient/Settings/Acknowledgements.m

@@ -30,7 +30,6 @@
 {
     if (self = [super initWithCoder:aDecoder])  {
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
     }
     
     return self;
@@ -71,11 +70,6 @@
     self.txtTermini.hidden = false;
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)cancelPressed
 {
     [self dismissViewControllerAnimated:true completion:nil];

+ 2 - 0
iOSClient/Settings/CCAdvanced.m

@@ -145,7 +145,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue

+ 2 - 0
iOSClient/Settings/CCManageAccount.m

@@ -166,7 +166,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 2 - 0
iOSClient/Settings/CCManageCameraUpload.m

@@ -213,7 +213,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 -(void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue

+ 2 - 0
iOSClient/Settings/CCManageCryptoCloud.m

@@ -88,7 +88,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 - (void)activateCryptoCloud:(XLFormRowDescriptor *)sender

+ 0 - 7
iOSClient/Settings/CCManageCryptoCloudSecurity.m

@@ -51,8 +51,6 @@
         XLFormSectionDescriptor *section;
         XLFormRowDescriptor *row;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         form = [XLFormDescriptor formDescriptorWithTitle:NSLocalizedString(@"_title_form_security_init_", nil)];
         
         // form mail
@@ -113,11 +111,6 @@
     [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 -(void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue
 {
     [super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];

+ 2 - 0
iOSClient/Settings/CCSettings.m

@@ -185,7 +185,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 0 - 7
iOSClient/Templates/CCAccountWeb.m

@@ -48,8 +48,6 @@
     
     if (self) {
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         self.delegate = delegate;
         self.fileName = fileName;
         self.isLocal = isLocal;
@@ -144,11 +142,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCBancomat.m

@@ -56,8 +56,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -151,11 +149,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCCartaDiCredito.m

@@ -56,8 +56,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -169,11 +167,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCCartaIdentita.m

@@ -55,8 +55,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -167,11 +165,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCContoCorrente.m

@@ -55,8 +55,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -167,11 +165,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCNote.m

@@ -55,8 +55,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -100,11 +98,6 @@
     self.view.backgroundColor = [UIColor whiteColor];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)viewDidAppear:(BOOL)animated
 {
     [super viewDidAppear:animated];

+ 0 - 7
iOSClient/Templates/CCPassaporto.m

@@ -55,8 +55,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -167,11 +165,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 0 - 7
iOSClient/Templates/CCPatenteGuida.m

@@ -57,8 +57,6 @@
         self.uuid = uuid;
         self.serverUrl = serverUrl;
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
-        
         // if fileName read Crypto File
         if (fileName)
             field = [[CCCrypto sharedManager] getDictionaryEncrypted:fileName uuid:uuid isLocal:isLocal directoryUser:app.directoryUser];
@@ -161,11 +159,6 @@
     if (self.fileName && !field) [self performSelector:@selector(cancelPressed:) withObject:nil afterDelay:0.5];
 }
 
-- (void)changeTheming
-{
-    [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
-}
-
 - (void)didSelectFormRow:(XLFormRowDescriptor *)formRow
 {
     [super didSelectFormRow:formRow];

+ 2 - 0
iOSClient/Transfers/CCTransfers.m

@@ -105,7 +105,9 @@
 
 - (void)changeTheming
 {
+    // Navigation & TabBar color
     [app aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
+    [app aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 2 - 2
iOSClient/Utility/CCGraphics.m

@@ -278,7 +278,7 @@
     if (k_option_use_themingColor == NO || [color isEqual:k_color_brand_standard])
         return image;
     
-    CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
+    CGRect rect = CGRectMake(0, 0, image.size.width*2, image.size.height*2);
     UIGraphicsBeginImageContext(rect.size);
     CGContextRef context = UIGraphicsGetCurrentContext();
     CGContextClipToMask(context, rect, image.CGImage);
@@ -287,7 +287,7 @@
     UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
     UIGraphicsEndImageContext();
     
-    return [UIImage imageWithCGImage:img.CGImage scale:1.0 orientation: UIImageOrientationDownMirrored];
+    return [UIImage imageWithCGImage:img.CGImage scale:2.0 orientation: UIImageOrientationDownMirrored];
 }
 
 @end