mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
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:
@@ -17,8 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HomeScreenInvitesButton: View {
|
||||
@ScaledMetric private var badgeSize = 12.0
|
||||
|
||||
let title: String
|
||||
let hasBadge: Bool
|
||||
let action: () -> Void
|
||||
@@ -44,7 +42,7 @@ struct HomeScreenInvitesButton: View {
|
||||
|
||||
private var badge: some View {
|
||||
Circle()
|
||||
.frame(width: badgeSize, height: badgeSize)
|
||||
.scaledFrame(size: 12)
|
||||
.foregroundColor(.compound.iconAccentTertiary)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user