mirror of
https://github.com/yattee/yattee.git
synced 2026-04-10 17:46:58 +00:00
Fix ContentUnavailableView centering on Apple TV
On tvOS, ContentUnavailableView inside a Group doesn't expand to fill available space — it sizes to content and aligns top-leading. Add .frame(maxWidth: .infinity, maxHeight: .infinity) to all instances so they center correctly in their parent containers.
This commit is contained in:
@@ -71,12 +71,14 @@ struct MediaBrowserView: View {
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else if files.isEmpty {
|
||||
ContentUnavailableView {
|
||||
Label(String(localized: "mediaBrowser.emptyFolder"), systemImage: "folder")
|
||||
} description: {
|
||||
Text(String(localized: "mediaBrowser.emptyFolder.description"))
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
fileList
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ struct MediaSourcesView: View {
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
sourcesList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user