From ab004caad7e0684f2ba421cca6646ba5556293d7 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 4 Jan 2024 12:20:40 +0800 Subject: [PATCH] Add toolbar spacing on iPad --- .../Sources/App/Views/Home/HomeFeedViewIOS.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 24b1c6b61..5d8433de2 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -376,6 +376,7 @@ struct AnimatingCellHeight: AnimatableModifier { .foregroundColor(Color.toolbarItemForeground) } ).buttonStyle(.plain) + .padding(.horizontal, UIDevice.isIPad ? 5 : 0) } if enableGrid { Button( @@ -385,6 +386,7 @@ struct AnimatingCellHeight: AnimatableModifier { .foregroundColor(Color.toolbarItemForeground) } ).buttonStyle(.plain) + .padding(.horizontal, UIDevice.isIPad ? 5 : 0) } Button( @@ -400,6 +402,7 @@ struct AnimatingCellHeight: AnimatableModifier { .foregroundColor(Color.toolbarItemForeground) } ).buttonStyle(.plain) + .padding(.horizontal, UIDevice.isIPad ? 5 : 0) Button( action: { @@ -412,6 +415,7 @@ struct AnimatingCellHeight: AnimatableModifier { .foregroundColor(Color.toolbarItemForeground) } ).buttonStyle(.plain) + .padding(.horizontal, UIDevice.isIPad ? 5 : 0) } ToolbarItemGroup(placement: .bottomBar) { @@ -419,18 +423,14 @@ struct AnimatingCellHeight: AnimatableModifier { Button(action: { viewModel.bulkAction(dataService: dataService, action: .delete, items: Array(selection)) isEditMode = .inactive - }, label: { Image(systemName: "trash") }) - .alignmentGuide(HorizontalAlignment.center, computeValue: { dim in - dim[HorizontalAlignment.center] - }) + }, label: { Image.toolbarTrash }) + .padding(.horizontal, 10) Button(action: { viewModel.bulkAction(dataService: dataService, action: .archive, items: Array(selection)) isEditMode = .inactive - }, label: { Image(systemName: "archivebox") }) - .alignmentGuide(HorizontalAlignment.center, computeValue: { dim in - dim[HorizontalAlignment.center] - }) + }, label: { Image.toolbarArchive.padding(.top, 4) }) + .padding(.horizontal, 10) Spacer() Text("\(selection.count) selected").font(.footnote)