mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -45,7 +45,6 @@ struct CreateRoomScreen: View {
|
||||
.alert(item: $context.alertInfo)
|
||||
}
|
||||
|
||||
@ScaledMetric private var roomIconSize: CGFloat = 70
|
||||
private var roomSection: some View {
|
||||
Section {
|
||||
HStack(alignment: .center, spacing: 16) {
|
||||
@@ -61,7 +60,7 @@ struct CreateRoomScreen: View {
|
||||
} placeholder: {
|
||||
ProgressView()
|
||||
}
|
||||
.frame(width: roomIconSize, height: roomIconSize)
|
||||
.scaledFrame(size: 70)
|
||||
.clipShape(Circle())
|
||||
} else {
|
||||
cameraImage
|
||||
@@ -106,7 +105,7 @@ struct CreateRoomScreen: View {
|
||||
Image(systemName: "camera")
|
||||
.font(.system(size: 28, weight: .semibold))
|
||||
.foregroundColor(.compound.iconSecondary)
|
||||
.frame(width: roomIconSize, height: roomIconSize)
|
||||
.scaledFrame(size: 70)
|
||||
.background(Color.compound.bgSubtlePrimary)
|
||||
.clipShape(Circle())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user