diff --git a/iphone/Maps/Core/Theme/Colors.swift b/iphone/Maps/Core/Theme/Colors.swift index 9ba6b4e603..b25b2c3fca 100644 --- a/iphone/Maps/Core/Theme/Colors.swift +++ b/iphone/Maps/Core/Theme/Colors.swift @@ -59,6 +59,8 @@ class DayColors: IColors { var outdoorColor = UIColor(red: 0.235, green: 0.549, blue: 0.235, alpha: 1) var lonelyPlanetLogoColor = UIColor(red: 0, green: 0.286, blue: 0.565, alpha: 1) var carplayPlaceholderBackground = UIColor(221, 221, 205, alpha100) + var iconOpaqueGrayTint = UIColor(117, 117, 117, alpha100) + var iconOpaqueGrayBackground = UIColor(231, 231, 231, alpha100) } class NightColors: IColors { @@ -122,4 +124,6 @@ class NightColors: IColors { var outdoorColor = UIColor(147, 191, 57, alpha100) var lonelyPlanetLogoColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.7) var carplayPlaceholderBackground = UIColor(50, 54, 58, alpha100) + var iconOpaqueGrayTint = UIColor(197, 197, 197, alpha100) + var iconOpaqueGrayBackground = UIColor(84, 86, 90, alpha100) } diff --git a/iphone/Maps/Core/Theme/Components/IColors.swift b/iphone/Maps/Core/Theme/Components/IColors.swift index 2ce5bc0435..1f9590eacd 100644 --- a/iphone/Maps/Core/Theme/Components/IColors.swift +++ b/iphone/Maps/Core/Theme/Components/IColors.swift @@ -69,4 +69,6 @@ let alpha100: CGFloat = 1.0 var outdoorColor: UIColor { get } var lonelyPlanetLogoColor: UIColor { get } var carplayPlaceholderBackground: UIColor { get } + var iconOpaqueGrayTint: UIColor { get } + var iconOpaqueGrayBackground: UIColor { get } } diff --git a/iphone/Maps/Core/Theme/PlacePageStyleSheet.swift b/iphone/Maps/Core/Theme/PlacePageStyleSheet.swift index 30f569ddff..cd9b6471f5 100644 --- a/iphone/Maps/Core/Theme/PlacePageStyleSheet.swift +++ b/iphone/Maps/Core/Theme/PlacePageStyleSheet.swift @@ -111,8 +111,9 @@ class PlacePageStyleSheet: IStyleSheet { s.clip = true } - theme.add(styleName: "PPCloseButton") { (s) -> (Void) in - s.tintColor = colors.blackDividers + theme.add(styleName: "PPHeaderCircleIcon") { (s) -> (Void) in + s.tintColor = colors.iconOpaqueGrayTint + s.backgroundColor = colors.iconOpaqueGrayBackground } theme.add(styleName: "ChartView") { (s) -> (Void) in diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index cfe78215c8..17f44e9019 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -485,6 +485,7 @@ ED79A5D72BDF8D6100952D1F /* SynchronizationStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED79A5CF2BDF8D6100952D1F /* SynchronizationStateManager.swift */; }; ED79A5D82BDF8D6100952D1F /* DefaultLocalDirectoryMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED79A5D02BDF8D6100952D1F /* DefaultLocalDirectoryMonitor.swift */; }; ED7CCC4F2C1362E300E2A737 /* FileType.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7CCC4E2C1362E300E2A737 /* FileType.swift */; }; + ED808D0F2C38407800D52585 /* CircleImageButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED808D0E2C38407800D52585 /* CircleImageButton.swift */; }; ED8270F02C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED8270EF2C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift */; }; ED9857082C4ED02D00694F6C /* MailComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED9857072C4ED02D00694F6C /* MailComposer.swift */; }; ED9966802B94FBC20083CE55 /* ColorPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED99667D2B94FBC20083CE55 /* ColorPicker.swift */; }; @@ -1404,6 +1405,7 @@ ED79A5CF2BDF8D6100952D1F /* SynchronizationStateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SynchronizationStateManager.swift; sourceTree = ""; }; ED79A5D02BDF8D6100952D1F /* DefaultLocalDirectoryMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultLocalDirectoryMonitor.swift; sourceTree = ""; }; ED7CCC4E2C1362E300E2A737 /* FileType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileType.swift; sourceTree = ""; }; + ED808D0E2C38407800D52585 /* CircleImageButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleImageButton.swift; sourceTree = ""; }; ED8270EF2C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTableViewDetailedSwitchCell.swift; sourceTree = ""; }; ED9857072C4ED02D00694F6C /* MailComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailComposer.swift; sourceTree = ""; }; ED99667D2B94FBC20083CE55 /* ColorPicker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorPicker.swift; sourceTree = ""; }; @@ -2943,6 +2945,7 @@ 99C964252428C0F700E41723 /* PlacePageHeaderViewController.swift */, 99C964262428C0F700E41723 /* PlacePageHeaderBuilder.swift */, 99C9642F2428C27A00E41723 /* PlacePageHeaderView.swift */, + ED808D0E2C38407800D52585 /* CircleImageButton.swift */, ); path = PlacePageHeader; sourceTree = ""; @@ -4503,6 +4506,7 @@ FA8E808925F412E2002A1434 /* FirstSession.mm in Sources */, F6E2FF691E097BA00083EBEC /* MWMUnitsController.mm in Sources */, 6741AA031BF340DE002C974C /* MWMActivityViewController.mm in Sources */, + ED808D0F2C38407800D52585 /* CircleImageButton.swift in Sources */, CDCA27382237F1BD00167D87 /* BookmarkInfo.swift in Sources */, 993DF11A23F6BDB100AC231A /* UIBarButtonItemRenderer.swift in Sources */, 34AB668C1FC5AA330078E451 /* NavigationStreetNameView.swift in Sources */, diff --git a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift index 924ef31db8..706d66a71e 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift @@ -4,7 +4,6 @@ protocol BottomMenuInteractorProtocol: AnyObject { func downloadMaps() func donate() func openSettings() - func shareLocation(cell: BottomMenuItemCell) } @objc protocol BottomMenuDelegate { @@ -61,17 +60,4 @@ extension BottomMenuInteractor: BottomMenuInteractorProtocol { close() mapViewController?.performSegue(withIdentifier: "Map2Settings", sender: nil) } - - func shareLocation(cell: BottomMenuItemCell) { - let lastLocation = LocationManager.lastLocation() - guard let coordinates = lastLocation?.coordinate else { - let alert = UIAlertController(title: L("unknown_current_position"), message: nil, preferredStyle: .alert) - alert.addAction(UIAlertAction(title: L("ok"), style: .default, handler: nil)) - viewController?.present(alert, animated: true, completion: nil) - return; - } - guard let viewController = viewController else { return } - let vc = ActivityViewController.share(forMyPosition: coordinates) - vc?.present(inParentViewController: viewController, anchorView: cell.anchorView) - } } diff --git a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift index 7b8d950a0c..6eeb9b8495 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift @@ -8,7 +8,6 @@ class BottomMenuPresenter: NSObject { case downloadMaps case donate case settings - case share } enum Sections: Int { case layers @@ -80,11 +79,6 @@ extension BottomMenuPresenter { title: L("settings"), badgeCount: 0, enabled: true) - case .share: - cell.configure(imageName: "ic_menu_share", - title: L("share_my_location"), - badgeCount: 0, - enabled: true) } return cell } @@ -108,10 +102,6 @@ extension BottomMenuPresenter { interactor.donate() case .settings: interactor.openSettings() - case .share: - if let cell = tableView.cellForRow(at: indexPath) as? BottomMenuItemCell { - interactor.shareLocation(cell: cell) - } } } } diff --git a/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.swift b/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.swift index 647232c4c7..7b5cf7a6e3 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.swift @@ -1,6 +1,8 @@ import UIKit class BottomMenuLayersCell: UITableViewCell { + @IBOutlet weak var closeButton: CircleImageButton! + @IBOutlet private var subwayButton: BottomMenuLayerButton! { didSet { updateSubwayButton() @@ -22,6 +24,7 @@ class BottomMenuLayersCell: UITableViewCell { override func awakeFromNib() { super.awakeFromNib() MapOverlayManager.add(self) + closeButton.setImage(UIImage(named: "ic_close")) } deinit { diff --git a/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.xib b/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.xib index ceea133b5e..0937eb4a9f 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.xib +++ b/iphone/Maps/UI/BottomMenu/Menu/Cells/BottomMenuLayersCell.xib @@ -3,7 +3,7 @@ - + @@ -30,16 +30,12 @@ - -