After the last BETA update (13.7.3) it seems like after ALT+TAB (or minimizing and maximizing the Dopus Lister), the background effect from Mica is lost. It can only be fixed by closing and re-opening the Lister window.
I know that the custom themes are not supported nor should not be blocking from further improvements, but I'm reporting it in case there is some bug that causes the main window class name to change on ATL+TAB.
I doubt anything changed on our side here. Not intentionally, at least.
Maybe Mica For Everyone updated to exclude Opus, as it causes problems in Opus, as I explained in the thread you linked to. It makes parts of the Opus user interface unusable/invisible and should not be used with Opus. It's not just unsupported in Opus; it's something we recommend against using with Opus.
You can use background images in Opus if you want a gradient effect down the lister. The shared mode lets you use a single image that covers the whole window.
Mica wasn't updated since July 2023. Every part of Opus (that I use) is fully visible for me when using that theme. It was a matter of adding "dopus.viewpiccontainer" to the exceptions.
The problem started exactly in update 13.7.3 (maybe 1 earlier, but I doubt), therefore I reverted to the stable release and it was working again with no problem.
However, once the stable version was updated, it seems like the same issue from 13.7.3 BETA persists. So whenever the Dopus program window window minimizes, it loses the background effects from Mica.
I suppose it's related to this change:
Changing background images via Set BACKGROUNDIMAGE now uses a crossfade effect. Use BACKGROUNDIMAGEOPTS=nofade argument to disable this.
However I don't use the background image. Maybe it would be possible to add some bool check, so that when no background image is used it skips some of the new steps? It looks to me like it's redrawing or recoloring the window every time the window minimizes or gets full-sized using this button next to the window close X button.
It doesn't break anything. Everything worked perfectly for me for a few months now. I think it's unfair to judge things that you don't use personally. The effects that Mica give are impossible to replace. It just makes the program look great.
The issue with the background effect loss is reproducible. I can simply install an older Dopus version (before 13.7.3) and the problem is gone. So yeah, something from that update changed the way it behaves. There's possibly some unnecessary (?) recoloring (?) even when the background image is unused, which is triggered on minimizing the window. Or anything else that was changed in the code in that update.
I'm not sure why it's required, but I linked it now.
It looks like MicaForEveryone has a nice option under Config File section: "Reload on change".
So I created a new script for Directory Opus that automatically updates the Mica's config file when the window becomes active, size changes or other events when the bug occurred:
function OnInit(initData) {
initData.name = "DopusListerMonitor";
initData.desc = "Monitor lister events to update Mica configuration file";
initData.default_enable = true;
initData.version = "1.0";
}
/*function OnListerUIChange(ListerUIChangeData) {
if(ListerUIChangeData.change == "minmax"){
DOpus.Output("ListerUIChangeData: " + ListerUIChangeData.change);
UpdateConfigFile();
}
}*/
function OnListerResize(ListerResizeData) {
if(ListerResizeData.action == "resize"){
DOpus.Output("MicaFix: OnListerResize: " + ListerResizeData.action);
UpdateConfigFile();
}
}
function OnActivateLister(activateListerData) {
if(activateListerData.active){
DOpus.Output("MicaFix: Lister activated");
//DOpus.Dlg.Request("Lister activated", "OK");
UpdateConfigFile();
}
}
function UpdateConfigFile() {
var mica_config_path = "D:\\FOLDERY\\SyncSettings\\MicaForEveryone.conf";
var lineToFind = "# DopusFix:";
var fso = new ActiveXObject("Scripting.FileSystemObject");
if (!fso.FileExists(mica_config_path)) {
DOpus.Output("MicaFix: Configuration file not found: " + mica_config_path);
return;
}
var inputFile;
try {
inputFile = fso.OpenTextFile(mica_config_path, 1); // For reading
} catch (e) {
DOpus.Output("MicaFix: Error opening file for reading: " + e.message);
return;
}
var content = [];
var found = false;
var random = Math.floor(Math.random() * 99) + 1;
// Read the file content
while (!inputFile.AtEndOfStream) {
var line = inputFile.ReadLine();
if (line.indexOf(lineToFind) != -1) {
found = true;
line = lineToFind + " " + random;
}
content.push(line);
}
inputFile.Close();
if (!found) {
content.push(lineToFind + " " + random);
}
// Write the updated content back to the original file
var outputFile;
try {
outputFile = fso.OpenTextFile(mica_config_path, 2); // For writing
} catch (e) {
DOpus.Output("MicaFix: Error opening file for writing: " + e.message);
return;
}
for (var i = 0; i < content.length; i++) {
outputFile.WriteLine(content[i]);
}
outputFile.Close();
DOpus.Output("MicaFix: Configuration file updated with random number: " + random);
//DOpus.Dlg.Request("Configuration file updated with random number: " + random, "OK");
}
Thanks to this Mica reloads the effect for the Dopus window and everything works the same way as before.