Nicer toolbar buttons
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class ScriptControllerIconView: UIButton
|
||||
class ScriptControllerIconView: ReliefButton
|
||||
{
|
||||
public var shieldsDown: Bool = false {
|
||||
didSet { setNeedsLayout() }
|
||||
@@ -23,8 +23,9 @@ class ScriptControllerIconView: UIButton
|
||||
private let shieldsUpImage = UIImage(systemName: "shield")
|
||||
private let shieldsPartiallyUpImage = UIImage(systemName: "shield.lefthalf.fill")
|
||||
|
||||
convenience init() {
|
||||
self.init(frame: .zero)
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
|
||||
addSubview(labelView)
|
||||
|
||||
@@ -39,6 +40,10 @@ class ScriptControllerIconView: UIButton
|
||||
setBlockedScriptsNumber(0)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
public func setBlockedScriptsNumber(_ num: Int) {
|
||||
if num > 0 {
|
||||
labelView.isHidden = false
|
||||
|
||||
Reference in New Issue
Block a user