mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Improve button image
This commit is contained in:
parent
66f6ee9bd0
commit
344385f5ef
@ -55,15 +55,22 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency, Media
|
|||||||
])
|
])
|
||||||
|
|
||||||
let button = UIButton(type: .custom)
|
let button = UIButton(type: .custom)
|
||||||
button.setTitle("Following", for: .normal)
|
button.setAttributedTitle(
|
||||||
button.setTitleColor(Asset.Colors.Label.primary.color, for: .normal)
|
.init(string: "Following", attributes: [
|
||||||
button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
|
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
|
||||||
|
]),
|
||||||
|
for: .normal)
|
||||||
let imageConfiguration = UIImage.SymbolConfiguration(pointSize: 16, weight: .bold, scale: .medium)
|
let imageConfiguration = UIImage.SymbolConfiguration(pointSize: 16, weight: .bold, scale: .medium)
|
||||||
button.setImage(.init(systemName: "arrowshape.down.circle", withConfiguration: imageConfiguration), for: .normal)
|
// button.setImage(
|
||||||
|
// .init(systemName: "chevron.down.circle.fill", withConfiguration: imageConfiguration)?.withRenderingMode(.alwaysTemplate),
|
||||||
|
// for: .normal)
|
||||||
|
// button.tintColor = Asset.Colors.disabled.color
|
||||||
|
// button.setTitleColor(Asset.Colors.Label.primary.color, for: .normal)
|
||||||
button.configuration = {
|
button.configuration = {
|
||||||
var config = UIButton.Configuration.plain()
|
var config = UIButton.Configuration.plain()
|
||||||
config.contentInsets = .init(top: 0, leading: 0, bottom: 0, trailing: 0)
|
config.contentInsets = .init(top: 0, leading: 0, bottom: 0, trailing: 0)
|
||||||
config.imagePadding = 8
|
config.imagePadding = 8
|
||||||
|
config.image = .init(systemName: "chevron.down.circle.fill", withConfiguration: imageConfiguration)?.withRenderingMode(.alwaysTemplate).withTintColor(Asset.Colors.disabled.color)
|
||||||
return config
|
return config
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user