fix: alpha 100% does not work without -t
This commit is contained in:
parent
0bc5b39f10
commit
87cec80802
1 changed files with 1 additions and 2 deletions
3
vvin.go
3
vvin.go
|
@ -185,10 +185,9 @@ func (c alphaCmd) Run(args []string, g globalCmd) error {
|
||||||
style, _, _ := getWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE)
|
style, _, _ := getWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE)
|
||||||
setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style|WS_EX_LAYERED)
|
setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style|WS_EX_LAYERED)
|
||||||
|
|
||||||
|
setLayeredWindowAttributes.Call(uintptr(g.targetHandle), 0, uintptr(alpha), LWA_ALPHA)
|
||||||
if alpha == 255 {
|
if alpha == 255 {
|
||||||
setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style&^WS_EX_LAYERED)
|
setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style&^WS_EX_LAYERED)
|
||||||
} else {
|
|
||||||
setLayeredWindowAttributes.Call(uintptr(g.targetHandle), 0, uintptr(alpha), LWA_ALPHA)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue