Add scaledFrame/scaledPadding APIs (#2079)

* Add scaled frame and padding modifiers

* Refactor AppLockScreen

* Refactor FormattingToolbar

* Refactor RoomAttachmentPicker

* Refactor ComposerToolbar

* Refactor VoiceMessageRecordingButton

* More refactors

* Refine ScaledPaddingModifier

* Cleanup

* Fix preview tests

* Fix preview test

* Use CompoundIcon for custom image

* Add .scaledFrame(size:) overload

* Set fallback style to .body
This commit is contained in:
Alfonso Grillo
2023-11-14 12:20:34 +01:00
committed by GitHub
parent 4257c20bc9
commit 752ad66397
43 changed files with 172 additions and 121 deletions
@@ -23,8 +23,6 @@ struct InvitesScreenCell: View {
let acceptAction: () -> Void
let declineAction: () -> Void
@ScaledMetric private var badgeSize = 12.0
var body: some View {
HStack(alignment: .top, spacing: 16) {
LoadableAvatarImage(url: invite.roomDetails.avatarURL,
@@ -150,7 +148,7 @@ struct InvitesScreenCell: View {
private var badge: some View {
Circle()
.frame(width: badgeSize, height: badgeSize)
.scaledFrame(size: 12)
.foregroundColor(.compound.iconAccentTertiary)
}
}