snoopwpf icon indicating copy to clipboard operation
snoopwpf copied to clipboard

Light mode broken

Open mo-russo opened this issue 2 years ago • 15 comments
trafficstars

It looks like this on my machine:

image

mo-russo avatar Feb 15 '23 14:02 mo-russo

Does that happen with every application you attach to?

batzen avatar Feb 15 '23 16:02 batzen

I just upgrade to the latest this morning, started my application, snooped it and it was like that. Didn't do anything special. The Dark mode works properly though which I'm using right now as a workaround.

edit And yes, it seems to be happening only in a specific application.

mo-russo avatar Feb 15 '23 16:02 mo-russo

Would it be possible to share your application?

batzen avatar Feb 15 '23 16:02 batzen

Unfortunately no, it's not my application but my employer's. I can't distribute it.

mo-russo avatar Feb 15 '23 18:02 mo-russo

That'll make it more difficult to fix as i can't reproduce the issue on my machine.

Could you try to snoop Snoop via the "Debug" menu and have a look at the colors Snoop is using?

It looks like, at least, the foreground color seems to be overwritten by the app being snooped, which usually shouldn't be possible as Snoop already does quite a lot to prevent that from happening.

batzen avatar Feb 15 '23 19:02 batzen

It does this on my machine as well, but malfunctions in Windows dark mode, and works correctly in light mode (I did install the program with dark mode enabled). I can confirm that it is application specific as well, testing it in other apps leads to correct results. Unfortunately my app is also not distributable. image

NMBSdtayloe avatar May 23 '23 19:05 NMBSdtayloe

Could you try to use the debug menu in Snoop and choose "Snoop Snoop". After that inspect the Snoop UI itself, have a look at the foreground property of one of the elements in the grid which has a wrong foreground? The foreground should reference to the resource key "Snoop.Brushes.Default.Foreground". Something in your application seems to influence that value.

batzen avatar May 25 '23 16:05 batzen

@NMBSdtayloe @mo-russo Have you tried the above to provide some information on the cause for this issue?

batzen avatar Jun 09 '23 11:06 batzen

@batzen Can you provide some guidance for how and where this value would be found? I did "Snoop Snoop" and this is maybe what you are looking for. I put a red box around an instance of the foreground brush you mentioned. image

NMBSdtayloe avatar Jun 09 '23 13:06 NMBSdtayloe

@NMBSdtayloe You have to inspect the TextBlock which has the wrong foreground while in dark mode and being attached to your application.

batzen avatar Jun 09 '23 14:06 batzen

These are some of the instances of textblock in my app. I apologize in advance, I do not have any experience in using snoop or digging through the treeview of a WPF app. I searched for textblock again later and somehow got more results and sometimes just a flat list or it selects the first random textblock it finds. image

NMBSdtayloe avatar Jun 09 '23 14:06 NMBSdtayloe

@NMBSdtayloe Is there a chance we can meet via Zoom, Skype, Teams or something like that? Then you could share your screen and I could tell you what you have to do to narrow down the issue.

batzen avatar Jun 09 '23 15:06 batzen

Have you guys tried version 4.0.1? Just tested 5.0.2 vs 4.0.1 and on my end this issue happens after 4.0.1. Maybe the error regressed?

EgilSandfeld avatar Aug 31 '23 18:08 EgilSandfeld

I changed quite a lot of the theme code etc. So it's most likely a regression, but as long as there is no repro I can't fix it as it happens with none of the apps I tried. @EgilSandfeld do you have a repro?

batzen avatar Aug 31 '23 19:08 batzen

@EgilSandfeld @mo-russo @NMBSdtayloe ping

batzen avatar Oct 03 '23 09:10 batzen

@batzen Have you made any progress on this? I'm having the same issue. However, same as the other users, I can't distribute the app I'm snooping, but I'm willing to help.

joce avatar Feb 28 '24 18:02 joce

@joce i still haven't seen an app causing this issue, so there is sadly still no fix or progress. Could you follow the steps from https://github.com/snoopwpf/snoopwpf/issues/397#issuecomment-1563176855 or would you be available for a call so we can narrow down the cause?

batzen avatar Feb 28 '24 19:02 batzen

Err. Even doing Snoop Snoop, I get the same issue!

image

joce avatar Feb 28 '24 21:02 joce

As others pointed out, it works fine when in Dark Mode on my side as well.

image

Can't you repro when you're in default app mode is Light Mode?

joce avatar Feb 28 '24 22:02 joce

This is what i get when using light mode system wide and attaching Snoop: image

batzen avatar Feb 29 '24 06:02 batzen

Interesting. I DM'd you on twitter to book a Zoom appointment.

joce avatar Feb 29 '24 14:02 joce

@joce Our call was very helpful. I finally found a way to reproduce the issue.

batzen avatar Mar 01 '24 13:03 batzen