Skip to content

Commit

Permalink
Change the Sign Out button to be ListRowButton. Sets a better heigh…
Browse files Browse the repository at this point in the history
…t value using `maxHeight` to ensure that it doesn't exceed the `ListRow` sizing.
  • Loading branch information
JPKribs committed Jan 29, 2025
1 parent 3f20320 commit 0a40e30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Swiftfin tvOS/Components/ListRowButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct ListRowButton: View {
}
}
.buttonStyle(.card)
.frame(height: 75)
.frame(maxHeight: 75)
.focused($isFocused)
}

Expand Down
18 changes: 5 additions & 13 deletions Swiftfin tvOS/Views/SettingsView/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,14 @@ struct SettingsView: View {
.onSelect {
router.route(to: \.serverDetail, viewModel.userSession.server)
}
}

Button {
Section {
ListRowButton(L10n.switchUser) {
viewModel.signOut()
} label: {
HStack {

Text(L10n.switchUser)
.foregroundColor(.jellyfinPurple)

Spacer()

Image(systemName: "chevron.right")
.font(.body.weight(.regular))
.foregroundColor(.secondary)
}
}
.foregroundStyle(Color.jellyfinPurple.overlayColor, Color.jellyfinPurple)
.listRowInsets(.zero)
}

Section(L10n.videoPlayer) {
Expand Down

0 comments on commit 0a40e30

Please sign in to comment.