Add about dialog
This commit is contained in:
parent
f17f13786d
commit
29d928c6ad
|
@ -12,9 +12,9 @@ closeWindow:
|
|||
en: Close Window
|
||||
de: Fenster schliessen
|
||||
|
||||
quit:
|
||||
en: Quit
|
||||
de: Verlassen
|
||||
about:
|
||||
en: About AdwaitaTemplate
|
||||
de: Info zu AdwaitaTemplate
|
||||
|
||||
mainMenu:
|
||||
en: Main Menu
|
||||
|
|
|
@ -2,6 +2,7 @@ import Adwaita
|
|||
|
||||
struct ToolbarView: View {
|
||||
|
||||
@State private var about = false
|
||||
var app: GTUIApp
|
||||
var window: GTUIApplicationWindow
|
||||
|
||||
|
@ -17,14 +18,22 @@ struct ToolbarView: View {
|
|||
}
|
||||
.keyboardShortcut("w".ctrl())
|
||||
MenuSection {
|
||||
MenuButton(Loc.quit, window: false) {
|
||||
app.quit()
|
||||
MenuButton(Loc.about, window: false) {
|
||||
about = true
|
||||
}
|
||||
.keyboardShortcut("q".ctrl())
|
||||
}
|
||||
}
|
||||
.primary()
|
||||
.tooltip(Loc.mainMenu)
|
||||
.aboutDialog(
|
||||
visible: $about,
|
||||
app: "AdwaitaTemplate",
|
||||
developer: "david-swift",
|
||||
version: "dev",
|
||||
icon: .custom(name: "io.github.AparokshaUI.AdwaitaTemplate"),
|
||||
website: .init(string: "https://github.com/AparokshaUI/AdwaitaTemplate")!,
|
||||
issues: .init(string: "https://github.com/AparokshaUI/AdwaitaTemplate/issues")!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue