mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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:
@@ -104,7 +104,6 @@ struct StaticLocationScreen: View {
|
||||
context.viewState.isLocationPickerMode ? .horizontal : [.horizontal, .bottom]
|
||||
}
|
||||
|
||||
@ScaledMetric private var shareMarkerSize: CGFloat = 28
|
||||
private var selectLocationButton: some View {
|
||||
Button {
|
||||
context.send(viewAction: .selectLocation)
|
||||
@@ -113,7 +112,7 @@ struct StaticLocationScreen: View {
|
||||
Image(asset: Asset.Images.locationMarker)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: shareMarkerSize, height: shareMarkerSize)
|
||||
.scaledFrame(size: 28)
|
||||
Text(context.viewState.isSharingUserLocation ? L10n.screenShareMyLocationAction : L10n.screenShareThisLocationAction)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user