mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +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:
@@ -18,8 +18,6 @@ import SwiftUI
|
||||
|
||||
struct VoiceMessageButton: View {
|
||||
@ScaledMetric private var buttonSize: CGFloat
|
||||
@ScaledMetric private var imageWidth: CGFloat = 12
|
||||
@ScaledMetric private var imageHeight: CGFloat = 14
|
||||
|
||||
enum State {
|
||||
case loading
|
||||
@@ -71,7 +69,7 @@ struct VoiceMessageButton: View {
|
||||
Image(asset: imageAsset)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: imageWidth, height: imageHeight)
|
||||
.scaledFrame(width: 12, height: 14)
|
||||
.offset(x: offset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user