mirror of
				https://github.com/yattee/yattee.git
				synced 2025-10-31 12:41:57 +00:00 
			
		
		
		
	Minor layout fixes
This commit is contained in:
		| @@ -15,12 +15,16 @@ struct AccountViewButton: View { | ||||
|             Button { | ||||
|                 navigation.presentingAccounts = true | ||||
|             } label: { | ||||
|                 HStack { | ||||
|                 HStack(spacing: 6) { | ||||
|                     if !accountPickerDisplaysUsername || !(model.current?.isPublic ?? true) { | ||||
|                         if let name = model.current?.app?.rawValue.capitalized { | ||||
|                             Image(name) | ||||
|                                 .resizable() | ||||
|                                 .frame(width: accountImageSize, height: accountImageSize) | ||||
|                         if #available(iOS 15, macOS 12, *) { | ||||
|                             if let name = model.current?.app?.rawValue.capitalized { | ||||
|                                 Image(name) | ||||
|                                     .resizable() | ||||
|                                     .frame(width: accountImageSize, height: accountImageSize) | ||||
|                             } else { | ||||
|                                 Image(systemName: "globe") | ||||
|                             } | ||||
|                         } else { | ||||
|                             Image(systemName: "globe") | ||||
|                         } | ||||
|   | ||||
| @@ -32,6 +32,7 @@ struct SearchTextField: View { | ||||
|                     .frame(maxWidth: 190) | ||||
|                     .textFieldStyle(.plain) | ||||
|                 #else | ||||
|                     .frame(minWidth: 200) | ||||
|                     .textFieldStyle(.roundedBorder) | ||||
|                     .padding(.horizontal, 5) | ||||
|                     .padding(.trailing, state.queryText.isEmpty ? 0 : 10) | ||||
| @@ -47,6 +48,7 @@ struct SearchTextField: View { | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         .transaction { t in t.animation = nil } | ||||
|     } | ||||
|  | ||||
|     private var fieldBorder: some View { | ||||
|   | ||||
| @@ -169,18 +169,11 @@ struct SearchView: View { | ||||
|         #endif | ||||
|         #if os(iOS) | ||||
|         .toolbar { | ||||
|             ToolbarItemGroup(placement: .navigationBarLeading) { | ||||
|                 if !navigationBarHidden { | ||||
|                     Button(action: { NavigationModel.shared.presentingSettings = true }) { | ||||
|                         Image(systemName: "gearshape.2") | ||||
|                     } | ||||
|                 } | ||||
|             ToolbarItem(placement: .navigationBarLeading) { | ||||
|                 searchMenu | ||||
|             } | ||||
|             ToolbarItem(placement: .principal) { | ||||
|                 HStack(spacing: 0) { | ||||
|                     searchMenu | ||||
|                     SearchTextField() | ||||
|                 } | ||||
|                 SearchTextField() | ||||
|             } | ||||
|         } | ||||
|         .navigationBarTitleDisplayMode(.inline) | ||||
| @@ -231,33 +224,6 @@ struct SearchView: View { | ||||
|         } | ||||
|     #endif | ||||
|  | ||||
|     private var navigationBarHidden: Bool { | ||||
|         if navigationStyle == .sidebar { | ||||
|             return true | ||||
|         } | ||||
|  | ||||
|         let preferred = Defaults[.visibleSections] | ||||
|         var visibleSections = [VisibleSection]() | ||||
|  | ||||
|         if accounts.app.supportsPopular && preferred.contains(.popular) { | ||||
|             visibleSections.append(.popular) | ||||
|         } | ||||
|  | ||||
|         if accounts.app.supportsSubscriptions && accounts.signedIn && preferred.contains(.subscriptions) { | ||||
|             visibleSections.append(.subscriptions) | ||||
|         } | ||||
|  | ||||
|         if accounts.app.supportsUserPlaylists && accounts.signedIn && preferred.contains(.playlists) { | ||||
|             visibleSections.append(.playlists) | ||||
|         } | ||||
|  | ||||
|         if preferred.contains(.trending) { | ||||
|             visibleSections.append(.trending) | ||||
|         } | ||||
|  | ||||
|         return !visibleSections.isEmpty || showHome | ||||
|     } | ||||
|  | ||||
|     private var results: some View { | ||||
|         VStack { | ||||
|             if showRecentQueries { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Arkadiusz Fal
					Arkadiusz Fal