Completes first forecast screen (experimental colors). Adds checkable theme in action bar. Fixes bug in show_matching_strings function

This commit is contained in:
alessandro90
2019-04-06 18:54:33 +02:00
parent 5b95d19d7c
commit d626475ace
7 changed files with 1920 additions and 856 deletions

View File

@@ -11,12 +11,24 @@ class SwitchableLabel(QLabel):
self.switch_off_color = off
def switch_on(self):
self.setStyleSheet(f"""background-color: {self.switch_on_color};
color:#000000;""")
if self.switch_on_color and self.switch_off_color:
self.setStyleSheet(f"""background-color: {self.switch_on_color};
color:#000000;""")
else:
self.setStyleSheet("""
color:#ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #4776e6 ,stop: 1 #8e54e9);
""")
def switch_off(self):
self.setStyleSheet(f"""background-color: {self.switch_off_color};
color:#000000;""")
if self.switch_on_color and self.switch_off_color:
self.setStyleSheet(f"""background-color: {self.switch_off_color};
color:#000000;""")
else:
self.setStyleSheet("""
color:#ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);
""")
class SwitchableLabelsIterable(object):