MirrorBar+ panels follow the bar transparency, part 2

This commit is contained in:
2026-11-08 03:53:07 +00:00
parent 572d64c280
commit f5d9389284
3 changed files with 194 additions and 8 deletions
+14 -1
View File
@@ -36,12 +36,14 @@ func loadFeatures() {
showNews = on
case "sys":
showSys = on
case "panelfade":
flyMatchBar = on
}
}
}
func saveFeatures() {
s := "weather=" + b01(showWeather) + "\nnews=" + b01(showNews) + "\nsys=" + b01(showSys) + "\n"
s := "weather=" + b01(showWeather) + "\nnews=" + b01(showNews) + "\nsys=" + b01(showSys) + "\npanelfade=" + b01(flyMatchBar) + "\n"
_ = os.MkdirAll(dataDir(), 0o755)
_ = os.WriteFile(featuresFile(), []byte(s), 0o644)
}
@@ -96,6 +98,17 @@ func setShowSys(on bool) {
featuresChanged()
}
// setFlyMatchBar is called by the settings window: should the panels be as
// see-through as the bar?
func setFlyMatchBar(on bool) {
if flyMatchBar == on {
return
}
flyMatchBar = on
saveFeatures()
flyRefreshAll()
}
func featuresChanged() {
settingsZipStatusUpdate()
redraw(hwndMain)