From 205994f05e92ab640ce44714cf70315e9e415ca3 Mon Sep 17 00:00:00 2001 From: Lucas Zischka Date: Mon, 26 Jun 2023 20:59:50 +0200 Subject: [PATCH] Fix #101 (thx @grandsir) replaces #123 --- CHANGELOG.md | 3 +++ .../BottomSheetView+HelperViews.swift | 22 +++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5857a655e..2fe4864a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ BottomSheet Changelog ================== +#### v3.1.1 +- Fix #101 (thx @grandsir) + #### v3.1.0 - Added the `.enableAccountingForKeyboardHeight(Bool)` modifier #97 - Added the `.enableFloatingIPadSheet(Bool)` modifier diff --git a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift index 40dd73db0..89bd0a66a 100644 --- a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift +++ b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift @@ -107,7 +107,11 @@ internal extension BottomSheetView { ) }) // Make it borderless for Mac - .buttonStyle(.borderless) + .buttonStyle(.borderless) + // Disable animation + .transaction { t in + t.disablesAnimations = true + } } func bottomSheetContent(with geometry: GeometryProxy) -> some View { @@ -328,14 +332,14 @@ internal extension BottomSheetView { bundle: Bundle.module ) // Design of the close button - .resizable() - .renderingMode(.template) - .foregroundColor(.tertiaryLabel) - .scaledToFit() - .frame( - width: 30, - height: 30 - ) + .resizable() + .renderingMode(.template) + .foregroundColor(.tertiaryLabel) + .scaledToFit() + .frame( + width: 30, + height: 30 + ) } // Make it borderless for Mac .buttonStyle(.borderless)