Qirky / Troop

Real-time Live Coding collaboration app
311 stars 37 forks source link

Transparency doesn't work on Mac #7

Open Chovin opened 7 years ago

Chovin commented 7 years ago

When trying to turn on transparency:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__
    return self.func(*args)
  File "/Users/Chovin/Projects/LiveCoding/Troop/src/interface/interface.py", line 1174, in ToggleTransparency
    self.root.wm_attributes('-transparentcolor', alpha)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1619, in wm_attributes
    return self.tk.call(args)
TclError: bad attribute "-transparentcolor": must be -alpha, -fullscreen, -modified, -notify, -titlepath, -topmost, or -transparent

this seems to be a Windows only feature https://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm#M13 :(

although it does seem there might be a Mac alternative: https://stackoverflow.com/a/44296157

Qirky commented 7 years ago

I've added in the Mac OS alternative but it can cause some visual tearing at times. If you could test it out and let me know that would be great.

Chovin commented 7 years ago

yeah, #8 still causes tearing, as it seems its history has diverged, would you like me to close it and move my future findings here?

Qirky commented 7 years ago

Oh yeah, sorry about that - I hadn't realised there was a PR and added it in myself.

Chovin commented 7 years ago

will do. I'll update here when I get time to look into it more