shonumi / gbe-plus

DMG/GBC/GBA emulator and experimental NDS emulator.
GNU General Public License v2.0
530 stars 80 forks source link

[Qt] Fix black window background #165

Closed randomusername-a closed 8 months ago

randomusername-a commented 8 months ago

This probably only affects Linux, because otherwise I don't know how this hasn't been noticed before.

Before: Screenshot_20240302_170358 After: Screenshot_20240302_170517

shonumi commented 8 months ago

Thanks for the fix! Weird, I use Linux daily and develop GBE+ exclusively with it. Haven't seen this at all so far. Maybe it's the Qt version?

I'll take a look into it before merging this PR. Code looks good to me 👍I just wanna figure out how/why it got so broken for some users but not for me.

And yet another reason to eventually ditch Qt...

randomusername-a commented 8 months ago

I think it depends on the application theme. The same code that looks wrong in my first comment (with the "Breeze" theme) looks fine with the default Qt theme, "Fusion".

I guess you're using a theme that works fine with that code, but it looks like not all themes do. image

randomusername-a commented 8 months ago

I have also just noticed that, with some colour schemes, QPainter changes its pen colour to white? It looks wrong. But setting the pen to the same colour as the brush (black) fixes it. image image