commit 9bac83352b66da2598518dbdcd605c7d037dda2e parent 08035945535d94c8efbd136c97a92a85361836af Author: Bryan Montz <bryanmontz@me.com> Date: Sun, 10 Sep 2023 15:01:08 -0500 ui: improve bottom spacing for ImageView's tab indicator dots Signed-off-by: Bryan Montz <bryanmontz@me.com> Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
M | damus/Views/Images/ImageView.swift | | | 20 | +++++++++++--------- |
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/damus/Views/Images/ImageView.swift b/damus/Views/Images/ImageView.swift @@ -63,18 +63,20 @@ struct ImageView: View { showMenu.toggle() }) .overlay( - VStack { - if showMenu { - NavDismissBarView() - Spacer() - - if (urls.count > 1) { - tabViewIndicator + GeometryReader { geo in + VStack { + if showMenu { + NavDismissBarView() + Spacer() + + if (urls.count > 1) { + tabViewIndicator + } } } + .animation(.easeInOut, value: showMenu) + .padding(.bottom, geo.safeAreaInsets.bottom == 0 ? 12 : 0) } - .animation(.easeInOut, value: showMenu) - .padding(.bottom, Theme.safeAreaInsets?.bottom) ) } }