Some appearance tweaks
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import QuartzCore_Private
|
||||
|
||||
class TitlebarView: UIView
|
||||
{
|
||||
@@ -15,10 +16,16 @@ class TitlebarView: UIView
|
||||
UIColor(red: 0.153, green: 0.000, blue: 0.153, alpha: 1.0)
|
||||
])
|
||||
|
||||
private let separatorView = UIView(frame: .zero)
|
||||
|
||||
convenience init() {
|
||||
self.init(frame: .zero)
|
||||
addSubview(backgroundView)
|
||||
addSubview(titleLabelView)
|
||||
addSubview(separatorView)
|
||||
|
||||
separatorView.backgroundColor = UIColor(white: 1.0, alpha: 0.20)
|
||||
separatorView.layer.compositingFilter = kCAFilterPlusL
|
||||
|
||||
titleLabelView.textColor = .white
|
||||
titleLabelView.layer.shadowColor = UIColor.black.cgColor
|
||||
@@ -61,5 +68,8 @@ class TitlebarView: UIView
|
||||
|
||||
backgroundView.frame = bounds
|
||||
titleLabelView.frame = bounds.avoiding(verticalInsets: safeAreaInsets).insetBy(dx: 8.0 + layoutMargins.left, dy: 0.0)
|
||||
|
||||
let separatorHeight = 1.0 / UIScreen.main.scale
|
||||
separatorView.frame = CGRect(x: 0, y: bounds.height - separatorHeight, width: bounds.width, height: separatorHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,16 @@ class ToolbarView: UIView
|
||||
var cancelButtonVisible: Bool = false { didSet { layoutSubviews() } }
|
||||
|
||||
let containerView = UIView(frame: .zero)
|
||||
let backgroundView = GradientView(direction: .vertical, colors: [.tertiarySystemGroupedBackground, .secondarySystemGroupedBackground])
|
||||
let backgroundView = GradientView(direction: .vertical, colors: [
|
||||
.init(dynamicProvider: { traits in
|
||||
if traits.userInterfaceStyle == .dark {
|
||||
return UIColor(white: 0.15, alpha: 1.0)
|
||||
} else {
|
||||
return UIColor.tertiarySystemGroupedBackground
|
||||
}
|
||||
}),
|
||||
.secondarySystemGroupedBackground
|
||||
])
|
||||
let cancelButton = UIButton(type: .system)
|
||||
|
||||
let leadingButtonsView = ToolbarButtonContainerView(frame: .zero)
|
||||
@@ -34,9 +43,9 @@ class ToolbarView: UIView
|
||||
|
||||
layer.masksToBounds = false
|
||||
layer.shadowColor = UIColor.black.cgColor
|
||||
layer.shadowOpacity = 0.2
|
||||
layer.shadowOpacity = 0.3
|
||||
layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
|
||||
layer.shadowRadius = 1.5
|
||||
layer.shadowRadius = 1.8
|
||||
}
|
||||
|
||||
override func sizeThatFits(_ size: CGSize) -> CGSize
|
||||
|
||||
@@ -49,7 +49,7 @@ class URLBar: ReliefButton
|
||||
private let progressIndicatorView = ProgressIndicatorView()
|
||||
private var progressIndicatorAnimating = false
|
||||
|
||||
private let documentImage = UIImage(systemName: "filemenu.and.selection")
|
||||
private let documentImage = UIImage(systemName: "ellipsis.circle")
|
||||
private let refreshImage = UIImage(systemName: "arrow.clockwise")
|
||||
private let stopImage = UIImage(systemName: "xmark")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user