wails icon indicating copy to clipboard operation
wails copied to clipboard

[v2, mac] Could not create transparent window

Open icaliskanoglu opened this issue 2 years ago • 0 comments

Description

I am trying to create a transparent background application. It is working in linux and windows as expected but it is not transparent for macOS. Here is the configuration:

	err = wails.Run(&options.App{
		Width:            512,
		Height:           512,
		BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 0},
		Mac: &mac.Options{
			WebviewIsTransparent: true,
			WindowIsTranslucent:  true,
		},
		Linux: &linux.Options{
			WindowIsTranslucent: true,
		},

		Frameless: true,
		AssetServer: &assetserver.Options{
			Assets: assets,
		},
		OnStartup: app.startup,
		Bind: []interface{}{
			app,
		},
		AlwaysOnTop: true,
	})

To Reproduce

  1. wails init -n test -t react
  2. cd test
  3. open main.go
  4. add Mac Options to options.App
  5. wails dev

Mac Options:

Mac: &mac.Options{
			WebviewIsTransparent: true,
			WindowIsTranslucent:  true,
		},

Expected behaviour

Based on the document , I am expecting the window should be transparent.

Screenshots

image

Attempted Fixes

No response

System Details

# Wails
Version | v2.6.0

# System
┌─────────────────────────┐
| OS           | MacOS    |
| Version      | 14.0     |
| ID           | 23A344   |
| Go Version   | go1.21.1 |
| Platform     | darwin   |
| Architecture | arm64    |
└─────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version         |
| Xcode command line tools  | N/A          | Installed | 2399            |
| Nodejs                    | N/A          | Installed | 16.20.2         |
| npm                       | N/A          | Installed | 10.1.0          |
| *Xcode                    | N/A          | Installed | 15.0.1 (15A507) |
| *upx                      | N/A          | Available |                 |
| *nsis                     | N/A          | Available |                 |
└─────────────────────── * - Optional Dependency ────────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

icaliskanoglu avatar Nov 06 '23 22:11 icaliskanoglu