ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.22k stars 162 forks source link

DDS Preview 'Pick background colour' broken #1060

Closed atrHusK closed 4 years ago

atrHusK commented 4 years ago

The problem:

When you Preview a texture that is partly transparent you get the checkered pattern. Sometimes you need to change the background color so you can review white textures that are partly transparent. There apparently exists a button to do this but setting a color does not change the color for the checkered pattern. Closing and reopening preview also has no effect.

To Reproduce:

  1. Install a mod with transparent textures (or create one from vanilla bsa sources in any game)
  2. Open the information screen
  3. Open the dds texture with preview, either from Filetree or from Conflicts
  4. Press the button 'Pick background colour'
  5. Choose a different color (black, green, whatever)
  6. Press OK
  7. see that background remains the same

Environment:

AnyOldName3 commented 4 years ago

We probably just need to make setBackgroundColour https://github.com/ModOrganizer2/modorganizer-preview_dds/blob/master/src/DDSPreview.py#L295 tell Qt to redraw the widget. I'm pretty sure if you do anything like resize the window the new background will appear with the way things are now.

AnyOldName3 commented 4 years ago

Actually, no, I can't reproduce this. Are you sure you weren't just picking another colour that also had 0% alpha, so was still completely transparent?

AnyOldName3 commented 4 years ago

I've opened a thread on the Qt forums, which will hopefully pressure them to make the colour picker slightly more intuitive: https://forum.qt.io/topic/115757/qcolordialog-doesn-t-preview-alpha

atrHusK commented 4 years ago

When rechecking the issue I found it was caused by the alpha channel setting, it was set to 0 causing the chosen color not to be visible. I don't remember ever setting the alpha channel to 0 but its probably a logical default, unless someone wants to change the background color and looks only at the color picker :smirk: Perhaps a better default would be something that combines a higher alpha channel with a near white background color. 50 together with html #eeeeee for example. Or something that changes the alpha channel when using the color picker. Anyway, its not a bug but a failure of this user to see what setting are relevant to enable the changed background :flushed:

AnyOldName3 commented 4 years ago

It kind of is a bug as the UX for the colour picker is terrible when an alpha channel is involved. It's just Qt's bug rather than ours. I'd hoped someone in the know would see the thread I made and agree, but that's not happened. Maybe if more people replied to the thread agreeing that something needed to change, it would bump it to the top of their list again (increasing the chance that someone important actually sees it) and make them treat it as a higher priority if they did.