mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix webPreferencesPopoverView for macos
This commit is contained in:
parent
af6f8dd416
commit
09b28a1960
1 changed files with 17 additions and 9 deletions
|
|
@ -139,6 +139,17 @@ struct WebReaderContainerView: View {
|
|||
}
|
||||
}
|
||||
|
||||
var webPreferencesPopoverView: some View {
|
||||
WebPreferencesPopoverView(
|
||||
updateFontFamilyAction: { updateFontFamilyActionID = UUID() },
|
||||
updateFontAction: { updateFontActionID = UUID() },
|
||||
updateTextContrastAction: { updateTextContrastActionID = UUID() },
|
||||
updateMaxWidthAction: { updateMaxWidthActionID = UUID() },
|
||||
updateLineHeightAction: { updateLineHeightActionID = UUID() },
|
||||
dismissAction: { showPreferencesPopover = false }
|
||||
)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
if let articleContent = viewModel.articleContent {
|
||||
|
|
@ -210,16 +221,13 @@ struct WebReaderContainerView: View {
|
|||
}
|
||||
}
|
||||
#if os(iOS)
|
||||
// TODO: implement for mac
|
||||
.formSheet(isPresented: $showPreferencesPopover, useSmallDetent: false) {
|
||||
WebPreferencesPopoverView(
|
||||
updateFontFamilyAction: { updateFontFamilyActionID = UUID() },
|
||||
updateFontAction: { updateFontActionID = UUID() },
|
||||
updateTextContrastAction: { updateTextContrastActionID = UUID() },
|
||||
updateMaxWidthAction: { updateMaxWidthActionID = UUID() },
|
||||
updateLineHeightAction: { updateLineHeightActionID = UUID() },
|
||||
dismissAction: { showPreferencesPopover = false }
|
||||
)
|
||||
webPreferencesPopoverView
|
||||
}
|
||||
#else
|
||||
.sheet(isPresented: $showPreferencesPopover) {
|
||||
webPreferencesPopoverView
|
||||
.frame(minWidth: 400, minHeight: 400)
|
||||
}
|
||||
#endif
|
||||
.onDisappear {
|
||||
|
|
|
|||
Loading…
Reference in a new issue