mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:52:29 +08:00
Fixes #1315
This commit is contained in:
parent
43f8a1f773
commit
b94db409dd
@ -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)
|
||||
|
@ -99,6 +99,7 @@ func NewWindow(parent winc.Controller, appoptions *options.App, versionInfo *ope
|
||||
}
|
||||
|
||||
func (w *Window) Run() int {
|
||||
w.updateTheme()
|
||||
return winc.RunMainLoop()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user