mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 19:50:15 +08:00
inject default css if none given
This commit is contained in:
parent
83e063bf2b
commit
7135d4fa27
File diff suppressed because one or more lines are too long
39
assets/default/wails.css
Normal file
39
assets/default/wails.css
Normal file
File diff suppressed because one or more lines are too long
@ -141,6 +141,12 @@ func (h *Headless) start(conn *websocket.Conn) {
|
|||||||
}
|
}
|
||||||
h.log.DebugFields("Inject User CSS", Fields{"css": outputCSS})
|
h.log.DebugFields("Inject User CSS", Fields{"css": outputCSS})
|
||||||
h.injectCSS(h.appConfig.CSS)
|
h.injectCSS(h.appConfig.CSS)
|
||||||
|
} else {
|
||||||
|
// Use default wails css
|
||||||
|
h.log.Debug("Injecting Default Wails CSS")
|
||||||
|
defaultCSS := BoxString(&defaultAssets, "wails.css")
|
||||||
|
|
||||||
|
h.injectCSS(defaultCSS)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inject all the CSS files that have been added
|
// Inject all the CSS files that have been added
|
||||||
|
@ -208,6 +208,12 @@ func (w *webViewRenderer) Run() error {
|
|||||||
}
|
}
|
||||||
w.log.DebugFields("Inject User CSS", Fields{"css": outputCSS})
|
w.log.DebugFields("Inject User CSS", Fields{"css": outputCSS})
|
||||||
w.injectCSS(w.config.CSS)
|
w.injectCSS(w.config.CSS)
|
||||||
|
} else {
|
||||||
|
// Use default wails css
|
||||||
|
w.log.Debug("Injecting Default Wails CSS")
|
||||||
|
defaultCSS := BoxString(&defaultAssets, "wails.css")
|
||||||
|
|
||||||
|
w.injectCSS(defaultCSS)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inject all the CSS files that have been added
|
// Inject all the CSS files that have been added
|
||||||
|
Loading…
Reference in New Issue
Block a user