diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-01-11 17:38:49 +0300 |
---|---|---|
committer | Alexander Marchuk <alexm@maps.me> | 2016-01-12 13:31:38 +0300 |
commit | 851338fd57eac996db783fe517e8e2e82f0aa953 (patch) | |
tree | 05c68bdc5e68fab5534eab2e8bb5d2acc752e9d5 | |
parent | 427bf50fbe58c69d75e42b53ef0c6c2ef190cc16 (diff) |
[ios] Review fixes (night mode).night-theme-2
-rw-r--r-- | iphone/Maps/Categories/UIKitCategories.mm | 12 | ||||
-rw-r--r-- | iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h | 2 | ||||
-rw-r--r-- | iphone/Maps/Classes/MapViewController.mm | 5 | ||||
-rw-r--r-- | iphone/Maps/UIColor+MapsMeColor.mm | 4 |
4 files changed, 5 insertions, 18 deletions
diff --git a/iphone/Maps/Categories/UIKitCategories.mm b/iphone/Maps/Categories/UIKitCategories.mm index fe6a7b6279..9bbd8b5601 100644 --- a/iphone/Maps/Categories/UIKitCategories.mm +++ b/iphone/Maps/Categories/UIKitCategories.mm @@ -225,9 +225,7 @@ - (void)refresh { [super refresh]; - UIColor * opposite = self.selectedBackgroundView.backgroundColor.opposite; - if (opposite) - self.selectedBackgroundView.backgroundColor = opposite; + [self.selectedBackgroundView refresh]; } @end @@ -305,11 +303,9 @@ - (void)refresh { - UIColor * oppositeBackground = self.backgroundColor.opposite; + [super refresh]; UIColor * oppositeText = self.textColor.opposite; UIColor * oppositeTint = self.tintColor.opposite; - if (oppositeBackground) - self.backgroundColor = oppositeBackground; if (oppositeText) self.textColor = oppositeText; if (oppositeTint) @@ -322,14 +318,12 @@ - (void)refresh { + [super refresh]; UIColor * oppositeText = self.textColor.opposite; - UIColor * oppositeBackground = self.backgroundColor.opposite; UILabel * placeholder = [self valueForKey:@"_placeholderLabel"]; UIColor * oppositePlaceholder = placeholder.textColor.opposite; if (oppositeText) self.textColor = oppositeText; - if (oppositeBackground) - self.backgroundColor = oppositeBackground; if (oppositePlaceholder) placeholder.textColor = oppositePlaceholder; } diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h index 5f22797af0..421a0d992d 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h @@ -19,8 +19,6 @@ - (instancetype)init __attribute__((unavailable("init is not available"))); - (instancetype)initWithParentController:(MapViewController *)controller; -- (void)onEnterForeground; - #pragma mark - Layout - (void)refreshLayout; diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 1f8035ca30..ee53d32685 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -388,11 +388,6 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) { // Notify about entering foreground (should be called on the first launch too). GetFramework().EnterForeground(); - - if (self.isViewLoaded && self.view.window) - { - [self.controlsManager onEnterForeground]; - } } - (void)viewWillAppear:(BOOL)animated diff --git a/iphone/Maps/UIColor+MapsMeColor.mm b/iphone/Maps/UIColor+MapsMeColor.mm index fbad0bb0af..7cde3157a1 100644 --- a/iphone/Maps/UIColor+MapsMeColor.mm +++ b/iphone/Maps/UIColor+MapsMeColor.mm @@ -41,10 +41,10 @@ NSDictionary<NSString *, UIColor *> * night = @"blackSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha70], @"blackHintText" : [UIColor colorWithWhite:1. alpha:alpha30], @"blackDividers" : [UIColor colorWithWhite:1. alpha:alpha12], - @"white" : [UIColor colorWithRed:scaled(60) green:scaled(64) blue:scaled(68) alpha:alpha100], + @"white" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha100], @"whiteSecondaryText" : [UIColor colorWithWhite:1. alpha:alpha70], @"buttonDisabledBlueText" : [UIColor colorWithRed:scaled(255.) green:scaled(230.) blue:scaled(140.) alpha:alpha30], - @"alertBackground" : [UIColor colorWithRed:scaled(60) green:scaled(64) blue:68 alpha:alpha100] + @"alertBackground" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha100] }; NSDictionary<NSString *, UIColor *> * day = |