mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 19:53:25 +01:00
Fixes PillButton not respecting progressTintColor under certain conditions
This commit is contained in:
@@ -38,11 +38,8 @@ class PillButton: UIButton
|
|||||||
}
|
}
|
||||||
|
|
||||||
var progressTintColor: UIColor? {
|
var progressTintColor: UIColor? {
|
||||||
get {
|
didSet {
|
||||||
return self.progressView.progressTintColor
|
self.update()
|
||||||
}
|
|
||||||
set {
|
|
||||||
self.progressView.progressTintColor = newValue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +166,7 @@ private extension PillButton
|
|||||||
self.backgroundColor = self.tintColor.withAlphaComponent(0.15)
|
self.backgroundColor = self.tintColor.withAlphaComponent(0.15)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.progressView.progressTintColor = self.tintColor
|
self.progressView.progressTintColor = self.progressTintColor ?? self.tintColor
|
||||||
|
|
||||||
// Update font after init because the original titleLabel is replaced.
|
// Update font after init because the original titleLabel is replaced.
|
||||||
self.titleLabel?.font = UIFont.boldSystemFont(ofSize: 14)
|
self.titleLabel?.font = UIFont.boldSystemFont(ofSize: 14)
|
||||||
|
|||||||
Reference in New Issue
Block a user