5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 18:10:48 +08:00
This commit is contained in:
Lea Anthony 2022-04-06 21:53:40 +10:00
parent 43f8a1f773
commit b94db409dd
2 changed files with 1 additions and 2 deletions

View File

@ -37,12 +37,10 @@ func (w *Window) updateTheme() {
if win32.SupportsCustomThemes() && customTheme != nil {
if w.isActive {
if isDarkMode {
println("1")
win32.SetTitleBarColour(w.Handle(), customTheme.DarkModeTitleBar)
win32.SetTitleTextColour(w.Handle(), customTheme.DarkModeTitleText)
win32.SetBorderColour(w.Handle(), customTheme.DarkModeBorder)
} else {
println("2")
win32.SetTitleBarColour(w.Handle(), customTheme.LightModeTitleBar)
win32.SetTitleTextColour(w.Handle(), customTheme.LightModeTitleText)
win32.SetBorderColour(w.Handle(), customTheme.LightModeBorder)

View File

@ -99,6 +99,7 @@ func NewWindow(parent winc.Controller, appoptions *options.App, versionInfo *ope
}
func (w *Window) Run() int {
w.updateTheme()
return winc.RunMainLoop()
}