This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _get_opacity(self): | |
if platform == 'win': | |
try: | |
return winxpgui.GetLayeredWindowAttributes(HWND)[1] / 255. | |
except Exception as e: | |
Logger.error( | |
'failed to get opacity: {}'.format(e)) | |
else: | |
Logger.warning( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from Tkinter import * # from x import * is bad practice | |
from ttk import * | |
# http://tkinter.unpythonic.net/wiki/VerticalScrolledFrame | |
class VerticalScrolledFrame(Frame): | |
"""A pure Tkinter scrollable frame that actually works! | |
* Use the 'interior' attribute to place widgets inside the scrollable frame |