damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit ff151562975ff92366cb3191d8884a9792c9fe71
parent 0a9fbf50313ad88de8947e6a0ec5d45f837f7d58
Author: OlegAba <mail@olegaba.com>
Date:   Thu,  9 Feb 2023 00:29:56 -0500

Fix side menu offset

Changelog-Fixed: Fix side menu bug in landscape
Closes: #560

Diffstat:
Mdamus/Views/SideMenuView.swift | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/damus/Views/SideMenuView.swift b/damus/Views/SideMenuView.swift @@ -18,6 +18,7 @@ struct SideMenuView: View { var sideBarWidth = min(UIScreen.main.bounds.size.width * 0.65, 400.0) let verticalSpacing: CGFloat = 20 + let padding: CGFloat = 30 func fillColor() -> Color { colorScheme == .light ? DamusColors.white : DamusColors.black @@ -163,11 +164,11 @@ struct SideMenuView: View { } .padding(.top, verticalSpacing) } - .padding(.top, -15) - .padding([.leading, .trailing, .bottom], 30) + .padding(.top, -(padding / 2.0)) + .padding([.leading, .trailing, .bottom], padding) } .frame(width: sideBarWidth) - .offset(x: isSidebarVisible ? 0 : -sideBarWidth) + .offset(x: isSidebarVisible ? 0 : -(sideBarWidth + padding)) .animation(.default, value: isSidebarVisible) .alert("Logout", isPresented: $confirm_logout) { Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user."), role: .cancel) {