Commit 79aa7407 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][DarkMode] Support dark background

Removes the blur effect in the background view, which is not required
anymore.

Bug: 976645
Change-Id: Ic2d120dc163c471a67cf47451f1381dde495ec93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735375Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683968}
parent 8fe8c6e7
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#import "ios/chrome/browser/ui/popup_menu/public/popup_menu_ui_constants.h" #import "ios/chrome/browser/ui/popup_menu/public/popup_menu_ui_constants.h"
#import "ios/chrome/browser/ui/popup_menu/public/popup_menu_view_controller_delegate.h" #import "ios/chrome/browser/ui/popup_menu/public/popup_menu_view_controller_delegate.h"
#import "ios/chrome/browser/ui/util/accessibility_close_menu_button.h" #import "ios/chrome/browser/ui/util/accessibility_close_menu_button.h"
#import "ios/chrome/common/colors/semantic_color_names.h"
#import "ios/chrome/common/ui_util/constraints_ui_util.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
...@@ -16,8 +17,6 @@ ...@@ -16,8 +17,6 @@
namespace { namespace {
const CGFloat kImageMargin = 196; const CGFloat kImageMargin = 196;
const CGFloat kBackgroundGreyScale = 0.98;
const CGFloat kBackgroundAlpha = 0.65;
} // namespace } // namespace
@interface PopupMenuViewController () @interface PopupMenuViewController ()
...@@ -65,23 +64,7 @@ const CGFloat kBackgroundAlpha = 0.65; ...@@ -65,23 +64,7 @@ const CGFloat kBackgroundAlpha = 0.65;
// Sets the content container view up. // Sets the content container view up.
- (void)setUpContentContainer { - (void)setUpContentContainer {
_contentContainer = [[UIView alloc] init]; _contentContainer = [[UIView alloc] init];
_contentContainer.backgroundColor = [UIColor colorNamed:kBackgroundColor];
if (UIAccessibilityIsReduceTransparencyEnabled()) {
_contentContainer.backgroundColor =
[UIColor colorWithWhite:kBackgroundGreyScale alpha:1];
} else {
UIBlurEffect* blurEffect =
[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
UIVisualEffectView* blur =
[[UIVisualEffectView alloc] initWithEffect:blurEffect];
blur.translatesAutoresizingMaskIntoConstraints = NO;
blur.layer.cornerRadius = kPopupMenuCornerRadius;
blur.clipsToBounds = YES;
blur.backgroundColor = [UIColor colorWithWhite:kBackgroundGreyScale
alpha:kBackgroundAlpha];
[_contentContainer addSubview:blur];
AddSameConstraints(_contentContainer, blur);
}
UIImageView* shadow = UIImageView* shadow =
[[UIImageView alloc] initWithImage:StretchableImageNamed(@"menu_shadow")]; [[UIImageView alloc] initWithImage:StretchableImageNamed(@"menu_shadow")];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment