MirrorBar+ panels follow the bar transparency, part 1

This commit is contained in:
2026-11-08 03:52:53 +00:00
parent db0249bc14
commit 572d64c280
5 changed files with 55 additions and 56 deletions
+4 -5
View File
@@ -65,7 +65,7 @@ func newsInit(inst uintptr) {
wc.Size = uint32(unsafe.Sizeof(wc))
pRegisterClassEx.Call(uintptr(unsafe.Pointer(&wc)))
newsHwnd, _, _ = pCreateWindowEx.Call(
wsExToolWindow|wsExTopmost|wsExNoActivate,
wsExToolWindow|wsExTopmost|wsExNoActivate|wsExLayered,
uintptr(unsafe.Pointer(className)),
uintptr(unsafe.Pointer(u16(""))),
wsPopup,
@@ -168,7 +168,7 @@ func newsPlace() {
lh = newsHead + float64(newsVisible)*newsRow + newsFoot
}
flyPlace(newsHwnd, trayAnchor(trayNews), px(newsW), px(lh))
pInvalidateRect.Call(newsHwnd, 0, 1)
flyRefresh(newsHwnd)
}
// newsDone runs when a download finishes.
@@ -202,7 +202,7 @@ func newsPoll() {
}
if h != newsHover {
newsHover = h
pInvalidateRect.Call(newsHwnd, 0, 0)
flyRefresh(newsHwnd)
}
}
@@ -248,8 +248,7 @@ func newsClick(x, y int32) {
func newsDraw(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)
s := newsSnapshot()