Skip to content

Commit

Permalink
this is getting ridiculous
Browse files Browse the repository at this point in the history
  • Loading branch information
Janglinator committed Mar 25, 2017
1 parent 22fa78a commit 89ec667
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion netfox/Core/NFXGenericController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class NFXGenericController: NFXViewController
let matchesBodyHeaders = regexBodyHeaders.matches(in: string, options: NSRegularExpression.MatchingOptions.withoutAnchoringBounds, range: NSMakeRange(0, l)) as Array<NSTextCheckingResult>

for match in matchesBodyHeaders {
tempMutableString.addAttribute(NSFontAttributeName, value: NFXFont.NFXFontBold(14), range: match.range)
tempMutableString.addAttribute(NSFontAttributeName, value: NFXFont.NFXFontBold(size: 14), range: match.range)
tempMutableString.addAttribute(NSForegroundColorAttributeName, value: NFXColor.NFXOrangeColor(), range: match.range)
}

Expand Down
8 changes: 4 additions & 4 deletions netfox/Core/NFXHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,23 @@ extension NFXColor
extension NFXFont
{
#if os(iOS)
class func NFXFont(_ size: CGFloat) -> UIFont
class func NFXFont(size: CGFloat) -> UIFont
{
return UIFont(name: "HelveticaNeue", size: size)!
}

class func NFXFontBold(_ size: CGFloat) -> UIFont
class func NFXFontBold(size: CGFloat) -> UIFont
{
return UIFont(name: "HelveticaNeue-Bold", size: size)!
}

#elseif os(OSX)
class func NFXFont(_ size: CGFloat) -> NSFont
class func NFXFont(size: CGFloat) -> NSFont
{
return NSFont(name: "HelveticaNeue", size: size)!
}

class func NFXFontBold(_ size: CGFloat) -> NSFont
class func NFXFontBold(size: CGFloat) -> NSFont
{
return NSFont(name: "HelveticaNeue-Bold", size: size)!
}
Expand Down
2 changes: 1 addition & 1 deletion netfox/Core/NFXRawBodyDetailsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NFXRawBodyDetailsController: NFXGenericBodyDetailsController
self.bodyView.textColor = UIColor.NFXGray44Color()
self.bodyView.textAlignment = .left
self.bodyView.isEditable = false
self.bodyView.font = UIFont.NFXFont(13)
self.bodyView.font = UIFont.NFXFont(size: 13)

switch bodyType {
case .request:
Expand Down
10 changes: 5 additions & 5 deletions netfox/OSX/NFXListCell_OSX.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class NFXListCell_OSX: NSTableCellView
self.circleView.layer?.cornerRadius = 4
self.circleView.alphaValue = 0.2

self.requestTimeLabel.font = NSFont.NFXFontBold(13)
self.timeIntervalLabel.font = NSFont.NFXFont(12)
self.URLLabel.font = NSFont.NFXFont(12)
self.methodLabel.font = NSFont.NFXFont(12)
self.typeLabel.font = NSFont.NFXFont(12)
self.requestTimeLabel.font = NSFont.NFXFontBold(size: 13)
self.timeIntervalLabel.font = NSFont.NFXFont(size: 12)
self.URLLabel.font = NSFont.NFXFont(size: 12)
self.methodLabel.font = NSFont.NFXFont(size: 12)
self.typeLabel.font = NSFont.NFXFont(size: 12)

}

Expand Down
4 changes: 2 additions & 2 deletions netfox/iOS/NFXDetailsController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class NFXDetailsController_iOS: NFXDetailsController, MFMailComposeViewControlle
tempButton.setTitle(title, for: UIControlState())
tempButton.setTitleColor(UIColor.init(netHex: 0x6d6d6d), for: UIControlState())
tempButton.setTitleColor(UIColor.init(netHex: 0xf3f3f4), for: .selected)
tempButton.titleLabel?.font = UIFont.NFXFont(15)
tempButton.titleLabel?.font = UIFont.NFXFont(size: 15)
tempButton.addTarget(self, action: selector, for: .touchUpInside)
return tempButton
}
Expand All @@ -98,7 +98,7 @@ class NFXDetailsController_iOS: NFXDetailsController, MFMailComposeViewControlle
var textLabel: UILabel
textLabel = UILabel()
textLabel.frame = CGRect(x: 20, y: 20, width: scrollView.frame.width - 40, height: scrollView.frame.height - 20);
textLabel.font = UIFont.NFXFont(13)
textLabel.font = UIFont.NFXFont(size: 13)
textLabel.textColor = UIColor.NFXGray44Color()
textLabel.numberOfLines = 0
textLabel.attributedText = content
Expand Down
2 changes: 1 addition & 1 deletion netfox/iOS/NFXInfoController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NFXInfoController_iOS: NFXInfoController {

self.textLabel = UILabel()
self.textLabel.frame = CGRect(x: 20, y: 20, width: scrollView.frame.width - 40, height: scrollView.frame.height - 20);
self.textLabel.font = UIFont.NFXFont(13)
self.textLabel.font = UIFont.NFXFont(size: 13)
self.textLabel.textColor = UIColor.NFXGray44Color()
self.textLabel.attributedText = self.generateInfoString("Retrieving IP address..")
self.textLabel.numberOfLines = 0
Expand Down
10 changes: 5 additions & 5 deletions netfox/iOS/NFXListCell_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@ class NFXListCell: UITableViewCell
self.requestTimeLabel = UILabel(frame: CGRect.zero)
self.requestTimeLabel.textAlignment = .center
self.requestTimeLabel.textColor = UIColor.white
self.requestTimeLabel.font = UIFont.NFXFontBold(13)
self.requestTimeLabel.font = UIFont.NFXFontBold(size: 13)
contentView.addSubview(self.requestTimeLabel)

self.timeIntervalLabel = UILabel(frame: CGRect.zero)
self.timeIntervalLabel.textAlignment = .center
self.timeIntervalLabel.font = UIFont.NFXFont(12)
self.timeIntervalLabel.font = UIFont.NFXFont(size: 12)
contentView.addSubview(self.timeIntervalLabel)

self.URLLabel = UILabel(frame: CGRect.zero)
self.URLLabel.textColor = UIColor.NFXBlackColor()
self.URLLabel.font = UIFont.NFXFont(12)
self.URLLabel.font = UIFont.NFXFont(size: 12)
self.URLLabel.numberOfLines = 2
contentView.addSubview(self.URLLabel)

self.methodLabel = UILabel(frame: CGRect.zero)
self.methodLabel.textAlignment = .left
self.methodLabel.textColor = UIColor.NFXGray44Color()
self.methodLabel.font = UIFont.NFXFont(12)
self.methodLabel.font = UIFont.NFXFont(size: 12)
contentView.addSubview(self.methodLabel)

self.typeLabel = UILabel(frame: CGRect.zero)
self.typeLabel.textColor = UIColor.NFXGray44Color()
self.typeLabel.font = UIFont.NFXFont(12)
self.typeLabel.font = UIFont.NFXFont(size: 12)
contentView.addSubview(self.typeLabel)

self.circleView = UIView(frame: CGRect.zero)
Expand Down
12 changes: 6 additions & 6 deletions netfox/iOS/NFXSettingsController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
var nfxVersionLabel: UILabel
nfxVersionLabel = UILabel(frame: CGRect(x: 10, y: self.view.frame.height - 60, width: self.view.frame.width - 2*10, height: 30))
nfxVersionLabel.autoresizingMask = [.flexibleTopMargin, .flexibleWidth]
nfxVersionLabel.font = UIFont.NFXFont(14)
nfxVersionLabel.font = UIFont.NFXFont(size: 14)
nfxVersionLabel.textColor = UIColor.NFXOrangeColor()
nfxVersionLabel.textAlignment = .center
nfxVersionLabel.text = nfxVersionString
Expand All @@ -56,7 +56,7 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
var nfxURLButton: UIButton
nfxURLButton = UIButton(frame: CGRect(x: 10, y: self.view.frame.height - 40, width: self.view.frame.width - 2*10, height: 30))
nfxURLButton.autoresizingMask = [.flexibleTopMargin, .flexibleWidth]
nfxURLButton.titleLabel?.font = UIFont.NFXFont(12)
nfxURLButton.titleLabel?.font = UIFont.NFXFont(size: 12)
nfxURLButton.setTitleColor(UIColor.NFXGray44Color(), for: UIControlState())
nfxURLButton.titleLabel?.textAlignment = .center
nfxURLButton.setTitle(nfxURL, for: UIControlState())
Expand Down Expand Up @@ -109,7 +109,7 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = UITableViewCell()
cell.textLabel?.font = UIFont.NFXFont(14)
cell.textLabel?.font = UIFont.NFXFont(size: 14)
cell.tintColor = UIColor.NFXOrangeColor()

switch (indexPath as NSIndexPath).section
Expand All @@ -133,14 +133,14 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
cell.textLabel?.textAlignment = .center
cell.textLabel?.text = "Share Session Logs"
cell.textLabel?.textColor = UIColor.NFXGreenColor()
cell.textLabel?.font = UIFont.NFXFont(16)
cell.textLabel?.font = UIFont.NFXFont(size: 16)
return cell

case 3:
cell.textLabel?.textAlignment = .center
cell.textLabel?.text = "Clear data"
cell.textLabel?.textColor = UIColor.NFXRedColor()
cell.textLabel?.font = UIFont.NFXFont(16)
cell.textLabel?.font = UIFont.NFXFont(size: 16)

return cell

Expand Down Expand Up @@ -175,7 +175,7 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
filtersInfoLabel = UILabel(frame: headerView.bounds)
filtersInfoLabel.backgroundColor = UIColor.clear
filtersInfoLabel.autoresizingMask = [.flexibleWidth, .flexibleHeight]
filtersInfoLabel.font = UIFont.NFXFont(13)
filtersInfoLabel.font = UIFont.NFXFont(size: 13)
filtersInfoLabel.textColor = UIColor.NFXGray44Color()
filtersInfoLabel.textAlignment = .center
filtersInfoLabel.text = "\nSelect the types of responses that you want to see"
Expand Down
2 changes: 1 addition & 1 deletion netfox/iOS/NFXStatisticsController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NFXStatisticsController_iOS: NFXStatisticsController {

self.textLabel = UILabel()
self.textLabel.frame = CGRect(x: 20, y: 20, width: scrollView.frame.width - 40, height: scrollView.frame.height - 20);
self.textLabel.font = UIFont.NFXFont(13)
self.textLabel.font = UIFont.NFXFont(size: 13)
self.textLabel.textColor = UIColor.NFXGray44Color()
self.textLabel.numberOfLines = 0
self.textLabel.attributedText = getReportString()
Expand Down

0 comments on commit 89ec667

Please sign in to comment.