Skip to content

Commit 12797ee

Browse files
committed
fix: align icons and hit targets with macOS HIG across 20 views
Closes #629
1 parent 3e76346 commit 12797ee

20 files changed

Lines changed: 44 additions & 31 deletions

TablePro/Views/AIChat/AIChatPanelView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct AIChatPanelView: View {
225225
}
226226
.padding(.horizontal, 12)
227227
.padding(.vertical, 6)
228-
.background(Color.yellow.opacity(0.1))
228+
.background(Color(nsColor: .systemYellow).opacity(0.1))
229229
}
230230

231231
// MARK: - Input Area

TablePro/Views/Components/PaginationControlsView.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct PaginationControlsView: View {
3232
// Settings button (gear icon) - opens popover
3333
Button(action: { showSettings.toggle() }) {
3434
Image(systemName: "slider.horizontal.3")
35-
.font(.system(size: 12))
35+
.frame(width: 24, height: 24)
3636
}
3737
.buttonStyle(.borderless)
3838
.help("Pagination Settings")
@@ -59,7 +59,8 @@ struct PaginationControlsView: View {
5959
// Previous page button
6060
Button(action: onPrevious) {
6161
Image(systemName: "chevron.left")
62-
.font(.system(size: 11))
62+
.imageScale(.small)
63+
.frame(width: 24, height: 24)
6364
}
6465
.buttonStyle(.borderless)
6566
.disabled(!pagination.hasPreviousPage || pagination.isLoading)
@@ -80,7 +81,8 @@ struct PaginationControlsView: View {
8081
// Next page button
8182
Button(action: onNext) {
8283
Image(systemName: "chevron.right")
83-
.font(.system(size: 11))
84+
.imageScale(.small)
85+
.frame(width: 24, height: 24)
8486
}
8587
.buttonStyle(.borderless)
8688
.disabled(!pagination.hasNextPage || pagination.isLoading)

TablePro/Views/Components/SyncStatusIndicator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct SyncStatusIndicator: View {
8686
case .syncing:
8787
return AnyShapeStyle(.secondary)
8888
case .error:
89-
return AnyShapeStyle(Color.orange)
89+
return AnyShapeStyle(Color(nsColor: .systemOrange))
9090
case .disabled:
9191
return AnyShapeStyle(.tertiary)
9292
}

TablePro/Views/Connection/OnboardingContentView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ struct OnboardingContentView: View {
194194
.fill(i == currentPage ? Color.accentColor : Color(nsColor: .tertiaryLabelColor))
195195
.frame(width: 8, height: 8)
196196
.scaleEffect(i == currentPage ? 1.2 : 1.0)
197+
.frame(width: 24, height: 24)
198+
.contentShape(Circle())
197199
.onTapGesture { goToPage(i) }
198200
}
199201
}

TablePro/Views/DatabaseSwitcher/DatabaseSwitcherSheet.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ struct DatabaseSwitcherSheet: View {
168168
Task { await viewModel.refreshDatabases() }
169169
}) {
170170
Image(systemName: "arrow.clockwise")
171-
.font(.system(size: 14))
171+
.frame(width: 24, height: 24)
172172
}
173173
.buttonStyle(.borderless)
174174
.help("Refresh database list")
@@ -177,7 +177,7 @@ struct DatabaseSwitcherSheet: View {
177177
if databaseType != .sqlite && !isSchemaMode {
178178
Button(action: { showCreateDialog = true }) {
179179
Image(systemName: "plus")
180-
.font(.system(size: 14))
180+
.frame(width: 24, height: 24)
181181
}
182182
.buttonStyle(.borderless)
183183
.help("Create new database")

TablePro/Views/Editor/ExplainResultView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ struct ExplainResultView: View {
2828
HStack(spacing: 4) {
2929
Button(action: { fontSize = max(10, fontSize - 1) }) {
3030
Image(systemName: "textformat.size.smaller")
31+
.frame(width: 24, height: 24)
3132
}
3233
Text("\(Int(fontSize))")
3334
.font(.caption)
3435
.foregroundStyle(.secondary)
3536
.frame(width: 24)
3637
Button(action: { fontSize = min(24, fontSize + 1) }) {
3738
Image(systemName: "textformat.size.larger")
39+
.frame(width: 24, height: 24)
3840
}
3941
}
4042
.buttonStyle(.borderless)

TablePro/Views/Editor/HistoryPanelView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ private extension HistoryPanelView {
7676
showClearAllAlert = true
7777
} label: {
7878
Image(systemName: "trash")
79+
.frame(width: 24, height: 24)
7980
}
8081
.buttonStyle(.borderless)
8182
.disabled(entries.isEmpty)
@@ -155,7 +156,7 @@ private extension HistoryPanelView {
155156
VStack(spacing: 8) {
156157
if !searchText.isEmpty || dateFilter != .all {
157158
Image(systemName: "magnifyingglass")
158-
.font(.system(size: ThemeEngine.shared.activeTheme.iconSizes.huge))
159+
.font(.largeTitle)
159160
.foregroundStyle(.tertiary)
160161
Text("No Matching Queries")
161162
.font(.system(size: ThemeEngine.shared.activeTheme.typography.body, weight: .medium))
@@ -166,7 +167,7 @@ private extension HistoryPanelView {
166167
.multilineTextAlignment(.center)
167168
} else {
168169
Image(systemName: "clock.arrow.circlepath")
169-
.font(.system(size: ThemeEngine.shared.activeTheme.iconSizes.huge))
170+
.font(.largeTitle)
170171
.foregroundStyle(.tertiary)
171172
Text("No Query History Yet")
172173
.font(.system(size: ThemeEngine.shared.activeTheme.typography.body, weight: .medium))
@@ -268,7 +269,7 @@ private extension HistoryPanelView {
268269
var previewEmptyState: some View {
269270
VStack(spacing: 8) {
270271
Image(systemName: "doc.text")
271-
.font(.system(size: ThemeEngine.shared.activeTheme.iconSizes.huge))
272+
.font(.largeTitle)
272273
.foregroundStyle(.tertiary)
273274
Text("Select a Query")
274275
.font(.system(size: ThemeEngine.shared.activeTheme.typography.title3, weight: .medium))

TablePro/Views/Editor/QueryEditorView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ struct QueryEditorView: View {
8181
// Clear button
8282
Button(action: { queryText = "" }) {
8383
Image(systemName: "trash")
84+
.frame(width: 24, height: 24)
8485
}
8586
.buttonStyle(.borderless)
8687
.help("Clear Query")
8788

8889
// Format button
8990
Button(action: formatQuery) {
9091
Image(systemName: "text.alignleft")
92+
.frame(width: 24, height: 24)
9193
}
9294
.buttonStyle(.borderless)
9395
.help("Format Query (⌥⌘F)")

TablePro/Views/Filter/FilterPanelView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ struct FilterPanelView: View {
173173
}
174174
} label: {
175175
Image(systemName: "ellipsis.circle")
176-
.font(.system(size: ThemeEngine.shared.activeTheme.iconSizes.small))
177176
}
178177
.menuStyle(.borderlessButton)
179178
.foregroundStyle(.secondary)

TablePro/Views/Filter/FilterRowView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ struct FilterRowView: View {
140140
HStack(spacing: 4) {
141141
Button(action: onAdd) {
142142
Image(systemName: "plus")
143+
.frame(width: 24, height: 24)
143144
}
144145
.buttonStyle(.borderless)
145146
.controlSize(.small)
@@ -148,6 +149,7 @@ struct FilterRowView: View {
148149

149150
Button(action: onRemove) {
150151
Image(systemName: "minus")
152+
.frame(width: 24, height: 24)
151153
}
152154
.buttonStyle(.borderless)
153155
.controlSize(.small)

0 commit comments

Comments
 (0)