Skip to content

Commit 38866d7

Browse files
committed
Hotfix - bad text color values on start
Also those values are RGBA not HSL.
1 parent 721465f commit 38866d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python_password/PyPassword.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(self, **kwargs):
8282
}
8383

8484
# It has to be outside ``__init__``
85-
text_color_hsl = ListProperty([1, 1, 1, 1])
85+
text_color_rgba = ListProperty([.06, .06, .06, 1])
8686

8787
def build(self):
8888
with open(f'kv_templates{sep}PyPassword.kv', encoding='utf8') as fd:
@@ -501,12 +501,12 @@ def switch_theme(self, force=None):
501501
elif self.theme_cls.theme_style == 'Light':
502502
self.theme_cls.theme_style = 'Dark'
503503
self.text_color_hex = 'ffffff'
504-
self.text_color_hsl = (1, 1, 1, 1)
504+
self.text_color_rgba = (1, 1, 1, 1)
505505

506506
elif self.theme_cls.theme_style == 'Dark':
507507
self.theme_cls.theme_style = 'Light'
508508
self.text_color_hex = '111111'
509-
self.text_color_hsl = (.06, .06, .06, 1)
509+
self.text_color_rgba = (.06, .06, .06, 1)
510510

511511
else:
512512
raise NameError('No theme found')

python_password/kv_templates/PyPassword.kv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
MDRoundFlatIconButton:
4646
text: 'Switch theme'
4747
background_palette: 'Primary'
48-
text_color: app.text_color_hsl
48+
text_color: app.text_color_rgba
4949
icon: 'theme-light-dark'
5050
on_release: app.switch_theme()
5151

0 commit comments

Comments
 (0)