1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Maintain custom colours when changing state

This commit is contained in:
Jonathan Harris 2017-04-12 01:44:08 +01:00
parent bab17caffd
commit cf98234f9a

View File

@ -78,6 +78,11 @@ class HyperlinkLabel(platform == 'darwin' and tk.Label or ttk.Label, object):
# Change cursor and appearance depending on state and text
def configure(self, cnf=None, **kw):
# This class' state
for thing in ['url', 'popup_copy', 'underline', 'foreground', 'disabledforeground']:
if thing in kw:
setattr(self, thing, kw[thing])
if kw.get('state') == tk.DISABLED:
if 'foreground' not in kw:
kw['foreground'] = self.disabledforeground