mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v3] Fix SetBackgroundColour on Windows (#4492)
* Fix SetBackgroundColour on Windows Update Chromium window color on calls to SetBackgroundColour. * update changelog * v3.0.0-alpha.23 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
fdff7e7b21
commit
b7414a4303
5 changed files with 20 additions and 28 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
v3.0.0-alpha.22
|
||||
v3.0.0-alpha.23
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
## Fixed
|
||||
- Fix SetBackgroundColour on Windows by @PPTGamer in [PR](https://github.com/wailsapp/wails/pull/4492)
|
||||
|
|
@ -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.
|
||||
## Fixed
|
||||
- Fix SetBackgroundColour on Windows by @PPTGamer in [PR](https://github.com/wailsapp/wails/pull/4492)
|
||||
Loading…
Add table
Add a link
Reference in a new issue