MirrorBar+ panels follow the bar transparency, part 1
This commit is contained in:
+6
-7
@@ -66,7 +66,7 @@ func sysInit(inst uintptr) {
|
||||
wc.Size = uint32(unsafe.Sizeof(wc))
|
||||
pRegisterClassEx.Call(uintptr(unsafe.Pointer(&wc)))
|
||||
sysHwnd, _, _ = pCreateWindowEx.Call(
|
||||
wsExToolWindow|wsExTopmost|wsExNoActivate,
|
||||
wsExToolWindow|wsExTopmost|wsExNoActivate|wsExLayered,
|
||||
uintptr(unsafe.Pointer(className)),
|
||||
uintptr(unsafe.Pointer(u16(""))),
|
||||
wsPopup,
|
||||
@@ -91,7 +91,7 @@ func sysProc(hwnd, m, wparam, lparam uintptr) (result uintptr) {
|
||||
case wmTimer:
|
||||
if wparam == sysRefreshTimerID {
|
||||
sysRows = sysGather() // uptime and memory move
|
||||
pInvalidateRect.Call(sysHwnd, 0, 0)
|
||||
flyRefresh(sysHwnd)
|
||||
return 0
|
||||
}
|
||||
sysPoll()
|
||||
@@ -172,7 +172,7 @@ func sysPlace() {
|
||||
}
|
||||
lh := sysHead + float64(len(sysRows))*sysRow_ + sysFoot
|
||||
flyPlace(sysHwnd, trayAnchor(traySys), px(sysW), px(lh))
|
||||
pInvalidateRect.Call(sysHwnd, 0, 1)
|
||||
flyRefresh(sysHwnd)
|
||||
}
|
||||
|
||||
// sysRowAt is the line under a height in the panel (real pixels), or -1.
|
||||
@@ -214,7 +214,7 @@ func sysPoll() {
|
||||
changed = true
|
||||
}
|
||||
if changed {
|
||||
pInvalidateRect.Call(sysHwnd, 0, 0)
|
||||
flyRefresh(sysHwnd)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ func sysCopy(text, what string) {
|
||||
sysCopied = "Copy failed"
|
||||
}
|
||||
sysCopiedAt = time.Now()
|
||||
pInvalidateRect.Call(sysHwnd, 0, 0)
|
||||
flyRefresh(sysHwnd)
|
||||
}
|
||||
|
||||
func sysClick(x, y int32) {
|
||||
@@ -242,8 +242,7 @@ func sysClick(x, y int32) {
|
||||
|
||||
func sysDraw(hdc uintptr, W, H int32) {
|
||||
u := px
|
||||
fillRaw(hdc, rect{0, 0, W, H}, iconColor()) // the outline follows the tray icon color
|
||||
fillRaw(hdc, rect{u(1), u(1), W - u(1), H - u(1)}, colBack)
|
||||
flyFrame(hdc, W, H) // outline in the tray icon color; the background is added when painting
|
||||
|
||||
pad := u(14)
|
||||
line := uintptr(dtLeft | dtVCenter | dtSingleLine | dtEndEllipsis)
|
||||
|
||||
Reference in New Issue
Block a user