pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.6k stars 402 forks source link

Color fitting view by slot changes #2498

Open Evolution0 opened 1 year ago

Evolution0 commented 1 year ago

Would it be possible to switch this feature to using a semi-transparent color rather than a completely opaque one?

That way it tints whatever the background color is rather than replaces it. This should allow it to work better with different windows UI colors like in the case of modified Windows themes.

Example (Off): pyfa_off

Example (On): pyfa_current

Example (Transparent): pyfa_adjusted

wx.Colour() Supports alpha so it may work with minimal modification to config.py, but I don't know much about the wxPython module personally.

Edit: After checking it seems its not that simple, but it should be possible to use wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW) and blend that value with the tint color (tuple(round(system_background - alpha * (system_background - v)) for v in (R, G, B))), only problem I ran into doing so was that you can't really call any of those functions without having a wx app up yet, so can't be done in the slotColourMap but its likely you can just add a function to blend the three colors with what is assigned in the existing slotColourMap when the radiobox is ticked to enable the feature.