Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Mihaylenko <vxmihaylenko@gmail.com>2016-12-13 15:19:36 +0300
committerGitHub <noreply@github.com>2016-12-13 15:19:36 +0300
commitea8e35e0365ebf5a02bf3fe4f06f6ca3bf8d5117 (patch)
tree244e08a2b1881abecb08c56af52c2be9110456e3 /iphone/Maps
parente88138c194babd2f591c336cf42f9859416d8b4c (diff)
parente1f21f0ccd608d64906c507504f2a7ce06cd0b2a (diff)
Merge pull request #4974 from igrechuhin/MAPSME-3206
[MAPSME-3206] [ios] Removed blur from toast background.
Diffstat (limited to 'iphone/Maps')
-rw-r--r--iphone/Maps/Classes/CustomAlert/Toast/MWMToast.mm3
-rw-r--r--iphone/Maps/Classes/CustomAlert/Toast/MWMToast.xib90
-rw-r--r--iphone/Maps/UIColor+MapsMeColor.mm6
3 files changed, 47 insertions, 52 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.mm b/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.mm
index 4a094bdc32..5637150aa2 100644
--- a/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.mm
+++ b/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.mm
@@ -11,7 +11,7 @@ NSUInteger const kWordsPerSecond = 3;
@interface MWMToast ()
-@property(nonatomic) IBOutlet UIVisualEffectView * rootView;
+@property(nonatomic) IBOutlet UIView * rootView;
@property(nonatomic) IBOutlet UILabel * label;
@property(nonatomic) NSLayoutConstraint * bottomOffset;
@@ -25,6 +25,7 @@ NSUInteger const kWordsPerSecond = 3;
MWMToast * toast = [MWMToast toast];
toast.label.text = text;
toast.label.textColor = [UIColor blackPrimaryText];
+ toast.rootView.backgroundColor = [UIColor toastBackground];
[toast show];
}
diff --git a/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.xib b/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.xib
index 95ae389b3b..9fc269d28f 100644
--- a/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.xib
+++ b/iphone/Maps/Classes/CustomAlert/Toast/MWMToast.xib
@@ -1,63 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMToast">
<connections>
- <outlet property="label" destination="mPe-i4-dRq" id="s0h-O3-1Y2"/>
- <outlet property="rootView" destination="SVu-ra-Hl5" id="GEL-nd-Te2"/>
+ <outlet property="label" destination="SaG-Ko-yxa" id="dQy-VN-E3A"/>
+ <outlet property="rootView" destination="Z7z-Ts-A62" id="nYx-Tg-HwH"/>
</connections>
</placeholder>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <visualEffectView opaque="NO" contentMode="scaleToFill" id="SVu-ra-Hl5">
+ <view opaque="NO" multipleTouchEnabled="YES" contentMode="center" id="Z7z-Ts-A62">
<rect key="frame" x="0.0" y="0.0" width="240" height="64"/>
- <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
- <view key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="center" id="0Xo-JU-ane">
- <rect key="frame" x="0.0" y="0.0" width="240" height="64"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mPe-i4-dRq">
- <rect key="frame" x="16" y="32" width="208" height="20"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="textColor"/>
- <nil key="highlightedColor"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
- <userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular15"/>
- </userDefinedRuntimeAttributes>
- </label>
- </subviews>
- <constraints>
- <constraint firstAttribute="bottom" secondItem="mPe-i4-dRq" secondAttribute="bottom" priority="750" constant="12" id="1De-GK-okF"/>
- <constraint firstAttribute="trailing" secondItem="mPe-i4-dRq" secondAttribute="trailing" constant="16" id="IPF-07-Cfv"/>
- <constraint firstItem="mPe-i4-dRq" firstAttribute="leading" secondItem="0Xo-JU-ane" secondAttribute="leading" constant="16" id="IVN-AW-nq9"/>
- <constraint firstItem="mPe-i4-dRq" firstAttribute="top" secondItem="0Xo-JU-ane" secondAttribute="top" constant="32" id="fID-cb-97V"/>
- </constraints>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
- <size key="value" width="0.0" height="4"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
- <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.28000000000000003" colorSpace="custom" customColorSpace="sRGB"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
- <integer key="value" value="4"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
- <integer key="value" value="1"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="toastBackground"/>
- </userDefinedRuntimeAttributes>
- </view>
- <blurEffect style="light"/>
- <point key="canvasLocation" x="-8" y="-327"/>
- </visualEffectView>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SaG-Ko-yxa">
+ <rect key="frame" x="16" y="32" width="208" height="20"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular15"/>
+ </userDefinedRuntimeAttributes>
+ </label>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="SaG-Ko-yxa" secondAttribute="bottom" priority="750" constant="12" id="LQV-Xg-cqM"/>
+ <constraint firstItem="SaG-Ko-yxa" firstAttribute="leading" secondItem="Z7z-Ts-A62" secondAttribute="leading" constant="16" id="OID-q0-XVc"/>
+ <constraint firstAttribute="trailing" secondItem="SaG-Ko-yxa" secondAttribute="trailing" constant="16" id="PMA-X2-GAM"/>
+ <constraint firstItem="SaG-Ko-yxa" firstAttribute="top" secondItem="Z7z-Ts-A62" secondAttribute="top" constant="32" id="vuQ-0n-OI2"/>
+ </constraints>
+ <nil key="simulatedStatusBarMetrics"/>
+ <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
+ <size key="value" width="0.0" height="4"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.28000000000000003" colorSpace="custom" customColorSpace="sRGB"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
+ <integer key="value" value="4"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
+ <integer key="value" value="1"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="toastBackground"/>
+ </userDefinedRuntimeAttributes>
+ </view>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
</objects>
</document>
diff --git a/iphone/Maps/UIColor+MapsMeColor.mm b/iphone/Maps/UIColor+MapsMeColor.mm
index 55657f442d..af2f84492b 100644
--- a/iphone/Maps/UIColor+MapsMeColor.mm
+++ b/iphone/Maps/UIColor+MapsMeColor.mm
@@ -66,8 +66,7 @@ NSDictionary<NSString *, UIColor *> * night = @{
@"blackOpaque" : [UIColor colorWithWhite:1. alpha:alpha04],
@"bannerBackground" :
[UIColor colorWithRed:scaled(85.) green:scaled(90.) blue:scaled(90.) alpha:alpha100],
- @"toastBackground" :
- [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha26]
+ @"toastBackground" : [UIColor colorWithWhite:0. alpha:alpha87]
};
NSDictionary<NSString *, UIColor *> * day = @{
@@ -114,8 +113,7 @@ NSDictionary<NSString *, UIColor *> * day = @{
@"blackOpaque" : [UIColor colorWithWhite:0. alpha:alpha04],
@"bannerBackground" :
[UIColor colorWithRed:scaled(255.) green:scaled(248.) blue:scaled(225.) alpha:alpha100],
- @"toastBackground" :
- [UIColor colorWithRed:scaled(255.) green:scaled(255.) blue:scaled(255.) alpha:alpha40]
+ @"toastBackground" : [UIColor colorWithWhite:1. alpha:alpha87]
};
UIColor * color(SEL cmd)