diff --git a/docs/src/content/docs/changelog.mdx b/docs/src/content/docs/changelog.mdx index d1116b725..509856bdb 100644 --- a/docs/src/content/docs/changelog.mdx +++ b/docs/src/content/docs/changelog.mdx @@ -25,6 +25,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v3.0.0-alpha.23 - 2025-08-11 + +## Fixed +- Fix SetBackgroundColour on Windows by @PPTGamer in [PR](https://github.com/wailsapp/wails/pull/4492) + ## v3.0.0-alpha.22 - 2025-08-10 ## Added diff --git a/v3/internal/version/version.txt b/v3/internal/version/version.txt index 6b2ef80c5..3cf421e7f 100644 --- a/v3/internal/version/version.txt +++ b/v3/internal/version/version.txt @@ -1 +1 @@ -v3.0.0-alpha.22 \ No newline at end of file +v3.0.0-alpha.23 \ No newline at end of file diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index 8cdfa9c74..5e9c5907d 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -283,7 +283,13 @@ func (w *windowsWebviewWindow) execJS(js string) { } func (w *windowsWebviewWindow) setBackgroundColour(color RGBA) { - w32.SetBackgroundColour(w.hwnd, color.Red, color.Green, color.Blue) + switch w.parent.options.BackgroundType { + case BackgroundTypeSolid: + w32.SetBackgroundColour(w.hwnd, color.Red, color.Green, color.Blue) + w.chromium.SetBackgroundColour(color.Red, color.Green, color.Blue, color.Alpha) + case BackgroundTypeTransparent, BackgroundTypeTranslucent: + w.chromium.SetBackgroundColour(0, 0, 0, 0) + } } func (w *windowsWebviewWindow) framelessWithDecorations() bool { @@ -474,16 +480,9 @@ func (w *windowsWebviewWindow) run() { // The updateTheme call above will handle custom themes } - switch options.BackgroundType { - case BackgroundTypeSolid: - var col = options.BackgroundColour - w.setBackgroundColour(col) - w.chromium.SetBackgroundColour(col.Red, col.Green, col.Blue, col.Alpha) - case BackgroundTypeTransparent: - w.chromium.SetBackgroundColour(0, 0, 0, 0) - case BackgroundTypeTranslucent: - w.chromium.SetBackgroundColour(0, 0, 0, 0) - w.setBackdropType(options.Windows.BackdropType) + w.setBackgroundColour(options.BackgroundColour) + if options.BackgroundType == BackgroundTypeTranslucent { + w.setBackdropType(w.parent.options.Windows.BackdropType) } // Process StartState diff --git a/v3/release-notes.txt b/v3/release-notes.txt index 4e0aede8b..8751764ad 100644 --- a/v3/release-notes.txt +++ b/v3/release-notes.txt @@ -1,8 +1,2 @@ -## Added -- Add Content Protection on Windows/Mac by [@leaanthony](https://github.com/leaanthony) based on the original work of [@Taiterbase](https://github.com/Taiterbase) in this [PR](https://github.com/wailsapp/wails/pull/4241) -- Add support for passing CLI variables to Task commands through `wails3 build` and `wails3 package` aliases (#4422) by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/4488) - -## Changed -- `window.NativeWindowHandle()` -> `window.NativeWindow()` by @leaanthony in [#4471](https://github.com/wailsapp/wails/pull/4471) -- Refactor internal window handling by @leaanthony in [#4471](https://github.com/wailsapp/wails/pull/4471) -+ Fix extra-broad Linux package dependencies, fix outdated RPM dependencies. \ No newline at end of file +## Fixed +- Fix SetBackgroundColour on Windows by @PPTGamer in [PR](https://github.com/wailsapp/wails/pull/4492) \ No newline at end of file diff --git a/v3/release_notes.md b/v3/release_notes.md index 4e0aede8b..8751764ad 100644 --- a/v3/release_notes.md +++ b/v3/release_notes.md @@ -1,8 +1,2 @@ -## Added -- Add Content Protection on Windows/Mac by [@leaanthony](https://github.com/leaanthony) based on the original work of [@Taiterbase](https://github.com/Taiterbase) in this [PR](https://github.com/wailsapp/wails/pull/4241) -- Add support for passing CLI variables to Task commands through `wails3 build` and `wails3 package` aliases (#4422) by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/4488) - -## Changed -- `window.NativeWindowHandle()` -> `window.NativeWindow()` by @leaanthony in [#4471](https://github.com/wailsapp/wails/pull/4471) -- Refactor internal window handling by @leaanthony in [#4471](https://github.com/wailsapp/wails/pull/4471) -+ Fix extra-broad Linux package dependencies, fix outdated RPM dependencies. \ No newline at end of file +## Fixed +- Fix SetBackgroundColour on Windows by @PPTGamer in [PR](https://github.com/wailsapp/wails/pull/4492) \ No newline at end of file