From 55f34aee03e2f959c9b471fab2935db1b8d8222f Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 7 May 2018 07:44:57 +0100 Subject: [PATCH] fix color --- openlp/core/ui/icons.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/icons.py b/openlp/core/ui/icons.py index a8c68890a..1cce3030d 100644 --- a/openlp/core/ui/icons.py +++ b/openlp/core/ui/icons.py @@ -81,7 +81,7 @@ class UiIcons(object): 'email': {'icon': 'fa.envelope'}, 'exit': {'icon': 'fa.sign-out'}, 'group': {'icon': 'fa.object-group'}, - 'inactive': {'icon': 'fa.child', 'attr': 'color=\'red\''}, + 'inactive': {'icon': 'fa.child', 'attr': 'lightGray'}, 'info': {'icon': 'fa.info'}, 'live': {'icon': 'fa.desktop'}, 'manual': {'icon': 'fa.graduation-cap'}, @@ -128,9 +128,13 @@ class UiIcons(object): icon = icon_list[key]['icon'] try: attr = icon_list[key]['attr'] - setattr(self, key, qta.icon('fa.plus-circle', attr)) - except: + setattr(self, key, qta.icon(icon, color=attr)) + a = 1 + except KeyError: setattr(self, key, qta.icon(icon)) + except Exception: + import sys + print("Unexpected error:", sys.exc_info()) except: setattr(self, key, qta.icon('fa.plus-circle', color='red'))