macOS: update window appearance for About and ConfigurationErrors (#12601)
<img width="1224" height="696" alt="Xnip2026-05-06_19-13-31" src="https://github.com/user-attachments/assets/ab090dc0-7c06-4a01-8e7c-5d48ca6ccca3" />pull/12779/head
commit
b78174a68f
|
|
@ -13,6 +13,7 @@ class AboutController: NSWindowController, NSWindowDelegate {
|
||||||
window.center()
|
window.center()
|
||||||
window.isMovableByWindowBackground = true
|
window.isMovableByWindowBackground = true
|
||||||
window.contentView = NSHostingView(rootView: AboutView().environmentObject(viewModel))
|
window.contentView = NSHostingView(rootView: AboutView().environmentObject(viewModel))
|
||||||
|
window.titlebarAppearsTransparent = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Functions
|
// MARK: - Functions
|
||||||
|
|
|
||||||
|
|
@ -29,5 +29,6 @@ class ConfigurationErrorsController: NSWindowController, NSWindowDelegate, Confi
|
||||||
window.center()
|
window.center()
|
||||||
window.level = .popUpMenu
|
window.level = .popUpMenu
|
||||||
window.contentView = NSHostingView(rootView: ConfigurationErrorsView(model: self))
|
window.contentView = NSHostingView(rootView: ConfigurationErrorsView(model: self))
|
||||||
|
window.titlebarAppearsTransparent = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,11 @@ struct ConfigurationErrorsView<ViewModel: ConfigurationErrorsViewModel>: View {
|
||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
Button("Ignore") { model.errors = [] }
|
Button("Ignore") { model.errors = [] }
|
||||||
|
.keyboardShortcut(.cancelAction)
|
||||||
Button("Reload Configuration") { reloadConfig() }
|
Button("Reload Configuration") { reloadConfig() }
|
||||||
|
.keyboardShortcut(.defaultAction)
|
||||||
}
|
}
|
||||||
|
.controlSize(.large)
|
||||||
.padding([.bottom, .trailing])
|
.padding([.bottom, .trailing])
|
||||||
}
|
}
|
||||||
.frame(minWidth: 480, maxWidth: 960, minHeight: 270)
|
.frame(minWidth: 480, maxWidth: 960, minHeight: 270)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue