Update launch screen to use new logo and have dark mode variant

This commit is contained in:
Nora Trapp 2020-03-03 17:25:35 -08:00
parent 02bd1f02bc
commit aa8a782194
22 changed files with 106 additions and 40 deletions

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "signal-logo-white.pdf"
},
{
"idiom" : "universal",
"filename" : "signal-logo-white-alpha-90.pdf",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
]
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ultramarine-bd.pdf"
},
{
"idiom" : "universal",
"filename" : "ultramarine-bd-dark.pdf",
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
]
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -561,7 +561,7 @@ private class NoSelectedConversationViewController: OWSViewController {
view = UIView()
let logoContainer = UIView.container()
logoImageView.image = #imageLiteral(resourceName: "logoSignal").withRenderingMode(.alwaysTemplate)
logoImageView.image = #imageLiteral(resourceName: "signal-logo-128").withRenderingMode(.alwaysTemplate)
logoImageView.contentMode = .scaleAspectFit
logoContainer.addSubview(logoImageView)
logoImageView.autoPinTopToSuperviewMargin()

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -19,12 +19,13 @@ public class LoadingViewController: UIViewController {
override public func loadView() {
self.view = UIView()
view.backgroundColor = UIColor.ows_signalBlue
view.backgroundColor = Theme.launchScreenBackground
self.logoView = UIImageView(image: #imageLiteral(resourceName: "logoSignal"))
self.logoView = UIImageView(image: #imageLiteral(resourceName: "signal-logo-128-launch-screen"))
view.addSubview(logoView)
logoView.autoCenterInSuperview()
logoView.autoSetDimensions(to: CGSize(square: 128))
self.topLabel = buildLabel()
topLabel.alpha = 0

View File

@ -80,7 +80,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
providerConfiguration.supportedHandleTypes = [.phoneNumber, .generic]
let iconMaskImage = #imageLiteral(resourceName: "logoSignal")
let iconMaskImage = #imageLiteral(resourceName: "signal-logo-128")
providerConfiguration.iconTemplateImageData = iconMaskImage.pngData()
// We don't set the ringtoneSound property, so that we use either the

View File

@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="ipad10_5" orientation="portrait" layout="fullscreen" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -20,26 +16,38 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
<rect key="frame" x="0.0" y="0.0" width="834" height="1112"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logoSignal" translatesAutoresizingMaskIntoConstraints="NO" id="b92-yg-YYQ">
<rect key="frame" x="348" y="527.5" width="138" height="139"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ultramarine-launch-screen" translatesAutoresizingMaskIntoConstraints="NO" id="GV8-QX-qgJ">
<rect key="frame" x="0.0" y="0.0" width="1282" height="1112"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signal-logo-128-launch-screen" translatesAutoresizingMaskIntoConstraints="NO" id="b92-yg-YYQ">
<rect key="frame" x="353" y="492" width="128" height="128"/>
<constraints>
<constraint firstAttribute="width" constant="128" id="Xkq-NE-BxQ"/>
<constraint firstAttribute="height" constant="128" id="vKA-H4-Kec"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.12549019607843137" green="0.56470588235294117" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.22745098039215686" green="0.46274509803921571" blue="0.94117647058823528" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="b92-yg-YYQ" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="ec1-lk-fbn"/>
<constraint firstItem="b92-yg-YYQ" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="jLr-XH-MKf"/>
<constraint firstAttribute="bottom" secondItem="GV8-QX-qgJ" secondAttribute="bottom" id="3Q8-UI-t4t"/>
<constraint firstItem="b92-yg-YYQ" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="3n6-fz-Z3k"/>
<constraint firstAttribute="trailing" secondItem="GV8-QX-qgJ" secondAttribute="trailing" constant="-448" id="Jal-PL-JBn"/>
<constraint firstItem="GV8-QX-qgJ" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="Q8d-NE-bK1"/>
<constraint firstItem="GV8-QX-qgJ" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="VrU-MQ-maV"/>
<constraint firstItem="b92-yg-YYQ" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="gMB-yR-CiP"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
</scene>
</scenes>
<resources>
<image name="logoSignal" width="138" height="139"/>
<image name="signal-logo-128-launch-screen" width="128" height="128"/>
<image name="ultramarine-launch-screen" width="1" height="1"/>
</resources>
</document>

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
#import "OWSScreenLockUI.h"
@ -385,7 +385,7 @@ NS_ASSUME_NONNULL_BEGIN
window.hidden = NO;
window.windowLevel = UIWindowLevel_Background;
window.opaque = YES;
window.backgroundColor = UIColor.ows_signalBlueColor;
window.backgroundColor = Theme.launchScreenBackgroundColor;
ScreenLockViewController *viewController = [ScreenLockViewController new];
viewController.delegate = self;

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
#import "ScreenLockViewController.h"
@ -36,7 +36,7 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
{
[super loadView];
self.view.backgroundColor = UIColor.ows_signalBlueColor;
self.view.backgroundColor = Theme.launchScreenBackgroundColor;
UIView *edgesView = [UIView containerView];
[self.view addSubview:edgesView];
@ -44,11 +44,12 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
[edgesView autoPinEdgeToSuperviewEdge:ALEdgeBottom];
[edgesView autoPinWidthToSuperview];
UIImage *image = [UIImage imageNamed:@"logoSignal"];
UIImage *image = [UIImage imageNamed:@"signal-logo-128-launch-screen"];
UIImageView *imageView = [UIImageView new];
imageView.image = image;
[edgesView addSubview:imageView];
[imageView autoHCenterInSuperview];
[imageView autoSetDimensionsToSize:CGSizeMake(128, 128)];
const CGFloat kButtonHeight = 40.f;
OWSFlatButton *button =

View File

@ -50,6 +50,13 @@ public enum ThemeIcon: UInt {
@objc
public extension Theme {
@objc(launchScreenBackgroundColor)
class var launchScreenBackground: UIColor {
// We only adapt for dark theme on iOS 13+, because only iOS 13 supports
// handling dark / light appearance in the launch screen storyboard.
guard #available(iOS 13, *) else { return .ows_signalBlue }
return Theme.isDarkThemeEnabled ? .ows_signalBlueDark : .ows_signalBlue
}
class func iconImage(_ icon: ThemeIcon) -> UIImage {
let name = iconName(icon)

View File

@ -93,7 +93,7 @@ NSString *const ThemeKeyCurrentMode = @"ThemeKeyCurrentMode";
if (!self.storageCoordinator.isStorageReady) {
// Don't cache this value until it reflects the data store.
return NO;
return self.isSystemDarkThemeEnabled;
}
if (self.isDarkThemeEnabledNumber == nil) {

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -55,7 +55,12 @@ public extension UIColor {
@objc(ows_signalBlueColor)
class var ows_signalBlue: UIColor {
return UIColor(rgbHex: 0x2090EA)
return UIColor(rgbHex: 0x3A76F0)
}
@objc(ows_signalBlueDarkColor)
class var ows_signalBlueDark: UIColor {
return UIColor(rgbHex: 0x1851B4)
}
// MARK: Accent Colors

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
#import "OWSWindowManager.h"
@ -208,11 +208,10 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
window.hidden = YES;
window.windowLevel = UIWindowLevel_CallView();
window.opaque = YES;
// TODO: What's the right color to use here?
window.backgroundColor = UIColor.ows_signalBlueColor;
window.backgroundColor = Theme.launchScreenBackgroundColor;
UIViewController *viewController = [OWSWindowRootViewController new];
viewController.view.backgroundColor = UIColor.ows_signalBlueColor;
viewController.view.backgroundColor = Theme.launchScreenBackgroundColor;
// NOTE: Do not use OWSNavigationController for call window.
// It adjusts the size of the navigation bar to reflect the

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
import UIKit
@ -40,9 +40,9 @@ class SAEFailedViewController: UIViewController {
action: #selector(cancelPressed))
self.navigationItem.title = "Signal"
self.view.backgroundColor = UIColor.ows_signalBlue
self.view.backgroundColor = Theme.launchScreenBackground
let logoImage = UIImage(named: "logoSignal")
let logoImage = UIImage(named: "signal-logo-128-launch-screen")
let logoImageView = UIImageView(image: logoImage)
self.view.addSubview(logoImageView)
logoImageView.autoCenterInSuperview()

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
import UIKit
@ -61,7 +61,7 @@ class SAELoadViewController: UIViewController {
action: #selector(cancelPressed))
self.navigationItem.title = "Signal"
self.view.backgroundColor = UIColor.ows_signalBlue
self.view.backgroundColor = Theme.launchScreenBackground
let activityIndicator = UIActivityIndicatorView(style: .whiteLarge)
self.activityIndicator = activityIndicator

View File

@ -1,10 +1,11 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
#import "SAEScreenLockViewController.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SignalServiceKit/AppContext.h>
#import <SignalMessaging/Theme.h>
NS_ASSUME_NONNULL_BEGIN
@ -40,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
{
[super loadView];
self.view.backgroundColor = UIColor.ows_signalBlueColor;
self.view.backgroundColor = Theme.launchScreenBackgroundColor;
self.title = NSLocalizedString(@"SHARE_EXTENSION_VIEW_TITLE", @"Title for the 'share extension' view.");