Skip to content

Commit 7dde0f8

Browse files
committed
Standardize button icon sizing and backgrounds in AccessoryView
Added consistent frame and contentShape modifiers to all toolbar button icons for uniform sizing and improved touch targets. Updated glassEffect usage to separate background color application for better visual consistency.
1 parent 42105a7 commit 7dde0f8

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ extension StatusEditor {
3838
if #available(iOS 26, *) {
3939
contentView
4040
.padding(.vertical, 16)
41-
.glassEffect(.regular.tint(theme.primaryBackgroundColor.opacity(0.2)))
41+
.glassEffect(.regular)
42+
.background(theme.primaryBackgroundColor.opacity(0.2))
4243
.padding(.horizontal, 16)
4344
} else {
4445
Divider()
@@ -84,6 +85,8 @@ extension StatusEditor {
8485
isPhotosPickerPresented = true
8586
} label: {
8687
Label("status.editor.photo-library", systemImage: "photo")
88+
.frame(width: 25, height: 25)
89+
.contentShape(Rectangle())
8790
}
8891
#if !targetEnvironment(macCatalyst)
8992
Button {
@@ -102,6 +105,8 @@ extension StatusEditor {
102105
ProgressView()
103106
} else {
104107
Image(systemName: "photo.on.rectangle.angled")
108+
.frame(width: 25, height: 25)
109+
.contentShape(Rectangle())
105110
.foregroundStyle(theme.tintColor)
106111
}
107112
}
@@ -148,6 +153,8 @@ extension StatusEditor {
148153
followUpSEVMs.append(ViewModel(mode: .new(text: nil, visibility: focusedSEVM.visibility)))
149154
} label: {
150155
Image(systemName: "arrowshape.turn.up.left.circle.fill")
156+
.frame(width: 25, height: 25)
157+
.contentShape(Rectangle())
151158
}
152159
.disabled(!canAddNewSEVM)
153160

@@ -160,6 +167,8 @@ extension StatusEditor {
160167
let customEmojiSheetIconName =
161168
colorScheme == .light ? "face.smiling" : "face.smiling.inverse"
162169
Image(systemName: customEmojiSheetIconName)
170+
.frame(width: 25, height: 25)
171+
.contentShape(Rectangle())
163172
}
164173
.accessibilityLabel("accessibility.editor.button.custom-emojis")
165174
.sheet(isPresented: $isCustomEmojisSheetDisplay) {
@@ -178,12 +187,16 @@ extension StatusEditor {
178187
viewModel.insertStatusText(text: "@")
179188
} label: {
180189
Image(systemName: "at")
190+
.frame(width: 25, height: 25)
191+
.contentShape(Rectangle())
181192
}
182193

183194
Button {
184195
viewModel.insertStatusText(text: "#")
185196
} label: {
186197
Image(systemName: "number")
198+
.frame(width: 25, height: 25)
199+
.contentShape(Rectangle())
187200
}
188201
}
189202

@@ -252,6 +265,8 @@ extension StatusEditor {
252265
Image(systemName: "faxmachine")
253266
.accessibilityLabel("accessibility.editor.button.ai-prompt")
254267
.foregroundStyle(focusedSEVM.canPost ? theme.tintColor : .secondary)
268+
.frame(width: 25, height: 25)
269+
.contentShape(Rectangle())
255270
}
256271
}
257272
.buttonStyle(.plain)

0 commit comments

Comments
 (0)