Skip to content

Commit

Permalink
styling edits
Browse files Browse the repository at this point in the history
  • Loading branch information
noorhashem committed Jun 24, 2020
1 parent 4085267 commit dd561ac
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Extensions/Today/TodayViewController.swift
Expand Up @@ -32,14 +32,12 @@ private struct TodayUX {

@objc (TodayViewController)
class TodayViewController: UIViewController, NCWidgetProviding {

var copiedURL: URL?

fileprivate lazy var newTabButton: ImageButtonWithLabel = {
let imageButton = ImageButtonWithLabel()
imageButton.addTarget(self, action: #selector(onPressNewTab), forControlEvents: .touchUpInside)
imageButton.label.text = TodayStrings.NewTabButtonLabel

let button = imageButton.button
button.setImage(UIImage(named: "search-button"), for: .normal)
let label = imageButton.label
Expand All @@ -66,16 +64,12 @@ class TodayViewController: UIViewController, NCWidgetProviding {

fileprivate lazy var openCopiedLinkButton: ButtonWithSublabel = {
let button = ButtonWithSublabel()

button.setTitle(TodayStrings.GoToCopiedLinkLabel, for: .normal)
button.addTarget(self, action: #selector(onPressOpenClibpoard), for: .touchUpInside)

// We need to set the background image/color for .Normal, so the whole button is tappable.
button.setBackgroundColor(UIColor.clear, forState: .normal)
button.setBackgroundColor(TodayUX.backgroundHightlightColor, forState: .highlighted)

button.setImage(UIImage(named: "copy_link_icon")?.withRenderingMode(.alwaysTemplate), for: .normal)

button.label.font = UIFont.systemFont(ofSize: TodayUX.labelTextSize)
button.subtitleLabel.font = UIFont.systemFont(ofSize: TodayUX.linkTextSize)
return button
Expand Down Expand Up @@ -109,9 +103,8 @@ class TodayViewController: UIViewController, NCWidgetProviding {

override func viewDidLoad() {
super.viewDidLoad()

let widgetView: UIView!
self.extensionContext?.widgetLargestAvailableDisplayMode = .expanded
self.extensionContext?.widgetLargestAvailableDisplayMode = .compact
let effectView: UIVisualEffectView
if #available(iOS 13, *) {
effectView = UIVisualEffectView(effect: UIVibrancyEffect.widgetEffect(forVibrancyStyle: .label))
Expand Down

0 comments on commit dd561ac

Please sign in to comment.