mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Support vibrancy and transparency for webview
Options Colour -> RGBA
This commit is contained in:
@@ -11,6 +11,8 @@ extern void FullSizeContent(void *);
|
||||
extern void UseToolbar(void *);
|
||||
extern void HideToolbarSeparator(void *);
|
||||
extern void DisableFrame(void *);
|
||||
extern void SetVibrancy(void *, const char *);
|
||||
extern void WebviewIsTransparent(void *);
|
||||
*/
|
||||
import "C"
|
||||
|
||||
@@ -51,4 +53,14 @@ func (a *Application) processPlatformSettings() {
|
||||
if titlebar.TitlebarAppearsTransparent && titlebar.HideTitle {
|
||||
C.DisableFrame(a.app)
|
||||
}
|
||||
|
||||
// Process window vibrancy
|
||||
if mac.Vibrancy != "" {
|
||||
C.SetVibrancy(a.app, a.string2CString(string(mac.Vibrancy)))
|
||||
}
|
||||
|
||||
// Check if the webview should be transparent
|
||||
if mac.WebviewIsTransparent {
|
||||
C.WebviewIsTransparent(a.app)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user