Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[Rebranding] Changed the Icons of TabToolbar

  • Loading branch information
mahmoud-adam85 authored and Tim Palade committed Mar 28, 2018
1 parent db2c585 commit 5a9730c02299d48b868643cfd9df689f4c308c92
Showing with 167 additions and 0 deletions.
  1. +4 −0 Client.xcodeproj/project.pbxproj
  2. +7 −0 Client/Frontend/Browser/TabToolbar.swift
  3. +3 −0 Client/Frontend/Browser/URLBarView.swift
  4. +6 −0 Client/Frontend/Widgets/TabsButton.swift
  5. +6 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/Contents.json
  6. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-back.imageset/Back.png
  7. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-back.imageset/Back@2x.png
  8. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-back.imageset/Back@3x.png
  9. +23 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-back.imageset/Contents.json
  10. +23 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-forward.imageset/Contents.json
  11. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-forward.imageset/Forward.png
  12. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-forward.imageset/Forward@2x.png
  13. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-forward.imageset/Forward@3x.png
  14. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-menu.imageset/Burger_Menu.png
  15. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-menu.imageset/Burger_Menu@2x.png
  16. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-menu.imageset/Burger_Menu@3x.png
  17. +23 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-menu.imageset/Contents.json
  18. +23 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-refresh.imageset/Contents.json
  19. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-refresh.imageset/Refresh.png
  20. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-refresh.imageset/Refresh@2x.png
  21. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-refresh.imageset/Refresh@3x.png
  22. +23 −0 Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-stop.imageset/Contents.json
  23. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-stop.imageset/Stop.png
  24. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-stop.imageset/Stop@2x.png
  25. BIN Cliqz/Resources/Cliqz.xcassets/TabToolbar/cliqz-nav-stop.imageset/Stop@3x.png
  26. +21 −0 Cliqz/URLBar/CliqzTabToolbar.swift
  27. +5 −0 Cliqz/URLBar/CliqzURLBar.swift
@@ -45,6 +45,7 @@
19DE1F671EC13B6400428B8C /* LeanplumIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19DE1F661EC13B6400428B8C /* LeanplumIntegration.swift */; };
1E3CBC152057D83700898B05 /* CliqzAppSettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E3CBC142057D83700898B05 /* CliqzAppSettingsTableViewController.swift */; };
1E3CBC1D205806F000898B05 /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E3CBC1C205806F000898B05 /* DateExtension.swift */; };
1E7B7688206A8AC000FD0BA5 /* CliqzTabToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7B7687206A8AC000FD0BA5 /* CliqzTabToolbar.swift */; };
1EAFE4A3205934C8006A36B4 /* CliqzAppSettingsOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E3CBC162058057700898B05 /* CliqzAppSettingsOptions.swift */; };
1EAFE4F0205BDEC0006A36B4 /* cliqz.json in Resources */ = {isa = PBXBuildFile; fileRef = 1EAFE4EF205BDEC0006A36B4 /* cliqz.json */; };
1EAFE524205FBBBC006A36B4 /* CliqzLaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EAFE515205FBBBC006A36B4 /* CliqzLaunchScreen.xib */; };
@@ -1491,6 +1492,7 @@
1E3CBC142057D83700898B05 /* CliqzAppSettingsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CliqzAppSettingsTableViewController.swift; sourceTree = "<group>"; };
1E3CBC162058057700898B05 /* CliqzAppSettingsOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CliqzAppSettingsOptions.swift; sourceTree = "<group>"; };
1E3CBC1C205806F000898B05 /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
1E7B7687206A8AC000FD0BA5 /* CliqzTabToolbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CliqzTabToolbar.swift; sourceTree = "<group>"; };
1EAFE4EF205BDEC0006A36B4 /* cliqz.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = cliqz.json; path = "node_modules/browser-core/build/config/cliqz.json"; sourceTree = SOURCE_ROOT; };
1EAFE515205FBBBC006A36B4 /* CliqzLaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CliqzLaunchScreen.xib; sourceTree = "<group>"; };
1EAFE55A205FFE21006A36B4 /* LocalResourceSetting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalResourceSetting.swift; sourceTree = "<group>"; };
@@ -3430,6 +3432,7 @@
children = (
AFE484D22056838500554B2E /* CliqzURLBar.swift */,
1EEA36DC206401EB003B6AD5 /* CliqzTabLocationView.swift */,
1E7B7687206A8AC000FD0BA5 /* CliqzTabToolbar.swift */,
);
path = URLBar;
sourceTree = "<group>";
@@ -6207,6 +6210,7 @@
E69E06BA1C76173D00D0F926 /* RequirePasscodeIntervalViewController.swift in Sources */,
D3BA7E0E1B0E934F00153782 /* ContextMenuHelper.swift in Sources */,
E660BE061BB0666D009AC090 /* InnerStrokedView.swift in Sources */,
1E7B7688206A8AC000FD0BA5 /* CliqzTabToolbar.swift in Sources */,
1EAFE55F205FFE21006A36B4 /* LocalResourceSetting.swift in Sources */,
4F0445DD203333F200E2C0C7 /* NewsViewController.swift in Sources */,
4FF07D8B2063CA46001385A8 /* OffrzDataService.swift in Sources */,
@@ -39,8 +39,12 @@ protocol TabToolbarDelegate: class {
open class TabToolbarHelper: NSObject {
let toolbar: TabToolbarProtocol

/* Cliqz: changed the icons of ImageReload & ImageStop
let ImageReload = UIImage.templateImageNamed("nav-refresh")
let ImageStop = UIImage.templateImageNamed("nav-stop")
*/
let ImageReload = UIImage.templateImageNamed("cliqz-nav-refresh")
let ImageStop = UIImage.templateImageNamed("cliqz-nav-stop")

var loading: Bool = false {
didSet {
@@ -210,7 +214,10 @@ class TabToolbar: UIView {
setupAccessibility()

addSubview(contentView)
/* Cliqz: used CliqzTabToolbarHelper instead of TabToolbarHelper
helper = TabToolbarHelper(toolbar: self)
*/
helper = CliqzTabToolbarHelper(toolbar: self)
addButtons(actionButtons)
contentView.axis = .horizontal
contentView.distribution = .fillEqually
@@ -201,7 +201,10 @@ class URLBarView: UIView {
commonInit()
}

/* Cliqz: remove private modifier
fileprivate func commonInit() {
*/
func commonInit() {
locationContainer.addSubview(locationView)

[scrollToTopButton, line, tabsButton, progressBar, cancelButton, showQRScannerButton].forEach { addSubview($0) }
@@ -11,7 +11,10 @@ private struct TabsButtonUX {
static let TitleBackgroundColor: UIColor = UIColor.white
static let CornerRadius: CGFloat = 2
static let TitleFont: UIFont = UIConstants.DefaultChromeSmallFontBold
/* Cliqz: Changed the stroke width of the TabsButton
static let BorderStrokeWidth: CGFloat = 3
*/
static let BorderStrokeWidth: CGFloat = 1
}

class TabsButton: UIButton {
@@ -106,7 +109,10 @@ class TabsButton: UIButton {
make.edges.equalTo(insideButton)
}
insideButton.snp.remakeConstraints { (make) -> Void in
/* Cliqz: changed the size of the actual tabs button
make.size.equalTo(24)
*/
make.size.equalTo(20)
make.center.equalTo(self)
}
}
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Back.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Back@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Back@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Forward.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Forward@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Forward@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Burger_Menu.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Burger_Menu@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Burger_Menu@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Refresh.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Refresh@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Refresh@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Stop.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Stop@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Stop@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
//
// CliqzTabToolbar.swift
// Client
//
// Created by Mahmoud Adam on 3/27/18.
// Copyright © 2018 Mozilla. All rights reserved.
//
import UIKit

class CliqzTabToolbarHelper: TabToolbarHelper {

override init(toolbar: TabToolbarProtocol) {
super.init(toolbar: toolbar)
toolbar.backButton.setImage(UIImage.templateImageNamed("cliqz-nav-back"), for: .normal)
toolbar.forwardButton.setImage(UIImage.templateImageNamed("cliqz-nav-forward"), for: .normal)
toolbar.stopReloadButton.setImage(UIImage.templateImageNamed("cliqz-nav-refresh"), for: .normal)
toolbar.menuButton.setImage(UIImage.templateImageNamed("cliqz-nav-menu"), for: .normal)
}

}
@@ -60,6 +60,11 @@ class CliqzURLBar: URLBarView {
}
}

override func commonInit() {
super.commonInit()
helper = CliqzTabToolbarHelper(toolbar: self)
}

override func setupConstraints() {

if ghosteryButton.superview == nil {

0 comments on commit 5a9730c

Please sign in to comment.