1
0

GODT-1329: Dark mode, with macOS autodetect.

This commit is contained in:
Jakub
2021-12-14 16:27:55 +01:00
committed by Jakub Cuth
parent 20a0404efb
commit 0332a3f873
12 changed files with 345 additions and 14 deletions

View File

@ -128,6 +128,8 @@ type QMLBackend struct {
_ core.QUrl `property:"releaseNotesLink"`
_ core.QUrl `property:"landingPageLink"`
_ string `property:"colorSchemeName"`
_ func(string) `slot:"changeColorScheme"`
_ string `property:"currentEmailClient"`
_ func() `slot:"updateCurrentMailClient"`
_ func(description, address, emailClient string, includeLogs bool) `slot:"reportBug"`
@ -262,6 +264,14 @@ func (q *QMLBackend) setup(f *FrontendQt) {
// release notes link is set by update
f.setLicensePath()
f.setColorScheme()
q.ConnectChangeColorScheme(func(newScheme string) {
go func() {
defer f.panicHandler.HandlePanic()
f.changeColorScheme(newScheme)
}()
})
f.setCurrentEmailClient()
q.ConnectUpdateCurrentMailClient(func() {
go func() {