Commit d7c5fd80 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

change navigation bar color

Change-Id: I00e5f799bf2803a8cb9239722d954cfd1ca4f539
parent 369775fc
......@@ -100,6 +100,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// themetize the app
Chameleon.setGlobalThemeUsingPrimaryColor(UIColor.ringMain, withSecondaryColor: UIColor.ringSecondary, andContentStyle: .light)
Chameleon.setRingThemeUsingPrimaryColor(UIColor.ringMain, withSecondaryColor: UIColor.ringSecondary, andContentStyle: .light)
UIApplication.shared.statusBarStyle = .default
self.interactionsManager = GeneratedInteractionsManager(accountService: self.accountService,
contactService: self.contactsService,
conversationService: self.conversationsService,
......
......@@ -59,6 +59,7 @@ class CallViewController: UIViewController, StoryboardBased, ViewModelBased {
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .lightContent
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(screenTapped))
self.mainView.addGestureRecognizer(tapGestureRecognizer)
self.infoContainer.backgroundColor = UIColor.black.withAlphaComponent(0.3)
......
......@@ -59,6 +59,10 @@ extension Chameleon {
DesignableButton.appearance().backgroundColor = secondaryColor
ButtonTransparentBackground.appearance().tintColor = secondaryColor
ButtonTransparentBackground.appearance().backgroundColor = UIColor.clear
UIButton.appearance(whenContainedInInstancesOf: [UIView.self, UIImagePickerController.self]).tintColor = UIColor.white
UIButton.appearance(whenContainedInInstancesOf: [UIView.self, UIImagePickerController.self]).tintColor = UIColor.ringMain
UINavigationBar.appearance().barTintColor = UIColor.ringNavigationBar
UISearchBar.appearance().backgroundColor = UIColor.ringNavigationBar
UIButton.appearance(whenContainedInInstancesOf: [UINavigationBar.self]).tintColor = UIColor.ringMain
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.ringMain]
}
}
......@@ -29,8 +29,9 @@ extension UIColor {
self.init(red: red_, green: green_, blue: blue_, alpha: alpha)
}
static let ringMain = UIColor(red: 58, green: 192, blue: 210, alpha: 1.0)
static let ringMain = UIColor(red: 54, green: 125, blue: 156, alpha: 1.0)
static let ringSecondary = UIColor(red: 0, green: 76, blue: 96, alpha: 1.0)
static let ringMainLight = UIColor(red: 0, green: 76, blue: 96, alpha: 1.0)
static let ringMsgCellSent = UIColor(red: 58, green: 192, blue: 210, alpha: 1.0)
static let ringMsgCellSentText = UIColor(red: 255, green: 255, blue: 255, alpha: 1.0)
static let ringMsgCellReceived = UIColor(red: 231, green: 235, blue: 235, alpha: 1.0)
......@@ -39,4 +40,5 @@ extension UIColor {
static let ringMsgBackground = UIColor(red: 252, green: 252, blue: 252, alpha: 1.0)
static let ringMsgTextFieldBackground = UIColor(red: 252, green: 252, blue: 252, alpha: 1.0)
static let ringUITableViewCellSelection = UIColor(red: 209, green: 210, blue: 210, alpha: 1.0)
static let ringNavigationBar = UIColor(red: 235, green: 235, blue: 235, alpha: 1.0)
}
......@@ -75,4 +75,12 @@ extension UIViewController {
}).disposed(by: disposeBag)
}
func applyShadow() {
self.navigationController?.navigationBar.layer.shadowColor = UIColor.black.cgColor
self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0.0, height: 2.5)
self.navigationController?.navigationBar.layer.shadowOpacity = 0.2
self.navigationController?.navigationBar.layer.shadowRadius = 3
self.navigationController?.navigationBar.layer.masksToBounds = false
}
}
......@@ -37,6 +37,10 @@ class ContactRequestsViewController: UIViewController, StoryboardBased, ViewMode
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.applyShadow()
self.tableView.rx.modelSelected(ContactRequestItem.self)
.subscribe({ [unowned self] item in
if let ringId = item.element?.contactRequest.ringId {
......
......@@ -41,6 +41,10 @@ class ConversationViewController: UIViewController, UITextFieldDelegate, Storybo
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.applyShadow()
self.setupUI()
self.setupTableView()
self.setupBindings()
......@@ -115,7 +119,7 @@ class ConversationViewController: UIViewController, UITextFieldDelegate, Storybo
let dnlabel: UILabel = UILabel.init(frame: CGRect.init(x: imageSize + infoPadding, y: 4, width: maxNameLength, height: 20))
dnlabel.text = name
dnlabel.font = UIFont.systemFont(ofSize: nameSize)
dnlabel.textColor = UIColor.white
dnlabel.textColor = UIColor.ringMain
dnlabel.textAlignment = .left
titleView.addSubview(dnlabel)
userNameYOffset = 20.0
......@@ -125,7 +129,7 @@ class ConversationViewController: UIViewController, UITextFieldDelegate, Storybo
let unlabel: UILabel = UILabel.init(frame: CGRect.init(x: imageSize + infoPadding, y: userNameYOffset, width: maxNameLength, height: 24))
unlabel.text = username
unlabel.font = UIFont.systemFont(ofSize: nameSize)
unlabel.textColor = UIColor.white
unlabel.textColor = UIColor.ringMain
unlabel.textAlignment = .left
titleView.addSubview(unlabel)
......
......@@ -57,10 +57,13 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.setupDataSources()
self.setupTableViews()
self.setupSearchBar()
self.setupUI()
self.applyShadow()
/*
Register to keyboard notifications to adjust tableView insets when the keybaord appears
......@@ -72,11 +75,11 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.layer.shadowColor = UIColor.clear.cgColor
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
}
func setupUI() {
self.navigationItem.title = L10n.Global.homeTabBarTitle
self.viewModel.hideNoConversationsMessage
......@@ -212,13 +215,16 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased
func setupSearchBar() {
self.searchBar.returnKeyType = .done
self.searchBar.autocapitalizationType = .none
self.searchBar.tintColor = UIColor.ringMain
self.view.bringSubview(toFront: self.searchBar)
self.searchBar.layer.shadowColor = UIColor.black.cgColor
self.searchBar.layer.shadowOpacity = 0.5
self.searchBar.layer.shadowOffset = CGSize.zero
self.searchBar.layer.shadowRadius = 2
self.searchBar.layer.shadowOffset = CGSize(width: 0.0, height: 2.5)
self.searchBar.layer.shadowOpacity = 0.2
self.searchBar.layer.shadowRadius = 3
self.searchBar.layer.masksToBounds = false
//Bind the SearchBar to the ViewModel
self.searchBar.rx.text.orEmpty
......
......@@ -32,6 +32,9 @@ class LinkNewDeviceViewController: UIViewController, StoryboardBased, ViewModelB
self.view.backgroundColor = UIColor.white.withAlphaComponent(0.0)
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.showInitialAlert()
self.viewModel.observableState
......
......@@ -66,7 +66,7 @@
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="UNBLOCK">
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleColor" red="0.0" green="0.29964192708333331" blue="0.37647058823529411" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hik-h4-XBB">
......
......@@ -33,6 +33,10 @@ class BlockListViewController: UIViewController, StoryboardBased, ViewModelBased
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.applyShadow()
self.navigationItem.title = L10n.Accountpage.blockedContacts
}
......
......@@ -39,8 +39,16 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas
// MARK: - functions
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.navigationItem.title = L10n.Global.meTabBarTitle
self.configureBindings()
self.applyShadow()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
func configureBindings() {
......
......@@ -52,6 +52,8 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
// L10n
self.applyL10n()
......
......@@ -23,8 +23,9 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V
override func viewDidLoad() {
super.viewDidLoad()
// Bind ViewModel to View
UIApplication.shared.statusBarStyle = .default
// Bind ViewModel to View
self.viewModel.skipButtonTitle.asObservable().bind(to: self.skipButton.rx.title(for: .normal)).disposed(by: self.disposeBag)
// Bind View to ViewModel
......
......@@ -34,6 +34,8 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
self.applyL10n()
//bind view model to view
......
......@@ -39,6 +39,8 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased {
override func viewDidLoad() {
super.viewDidLoad()
UIApplication.shared.statusBarStyle = .default
// Bind ViewModel to View
self.viewModel.welcomeText.bind(to: self.welcomeTextLabel.rx.text).disposed(by: self.disposeBag)
self.viewModel.createAccount.bind(to: self.createAccountButton.rx.title(for: .normal)).disposed(by: self.disposeBag)
......
......@@ -45,7 +45,7 @@
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<string>UIStatusBarStyleDarkContent</string>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
......
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