mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Further design updates to the timeline. (#524)
- Decryption banner on the timeline - Bubble colours - Background insets - Multiline composer corner radius - Read marker - GIF indicator - Reactions shape - Use RoomTimelineViewLabelStyle everywhere possible - Only set a line limit on reply quotes, allow all the lines for regular quotes. - Message label icons - Yes/No button casing - Make sender profiles immutable. - Enable copy link and invite buttons. - Fix layout loop detecting multiline composer text. - Add animation to the encryption banner.
This commit is contained in:
@@ -16,32 +16,26 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// Small squared action button for settings screens
|
||||
struct SettingsActionButton: View {
|
||||
// MARK: Public
|
||||
|
||||
/// Small squared action button style for settings screens
|
||||
struct SettingsActionButtonStyle: ButtonStyle {
|
||||
let title: String
|
||||
let image: Image
|
||||
let action: () -> Void
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@ScaledMetric private var menuIconSize = 54.0
|
||||
|
||||
// MARK: Views
|
||||
|
||||
var body: some View {
|
||||
Button(action: action) {
|
||||
VStack {
|
||||
image
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.frame(width: menuIconSize, height: menuIconSize)
|
||||
.background(RoundedRectangle(cornerRadius: 16).fill(Color.element.background))
|
||||
Text(title)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.subheadline)
|
||||
}
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
VStack {
|
||||
configuration.label
|
||||
.buttonStyle(.plain)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.frame(width: menuIconSize, height: menuIconSize)
|
||||
.background {
|
||||
RoundedRectangle(cornerRadius: 16)
|
||||
.fill(Color.element.background.opacity(configuration.isPressed ? 0.5 : 1))
|
||||
}
|
||||
|
||||
Text(title)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.subheadline)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user