Skip to content

Commit

Permalink
Merge pull request #338 from nikolayromenskiy/main
Browse files Browse the repository at this point in the history
Styles for display/settings.py
  • Loading branch information
nikolayromenskiy authored Sep 17, 2024
2 parents d9100be + 2d00a21 commit 0ed9a69
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions display/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,14 @@ def create_static_widgets(self):
"default.TCombobox",
fieldbackground=[
("readonly", self.bg_entry),
("disabled", self.title_color),
("disabled", self.bg_entry),
],
)
ttk.Style().map(
"changed.TCombobox",
fieldbackground=[
("readonly", disp.bg_color),
("disabled", self.title_color),
("disabled", self.bg_entry),
],
foreground=[
("readonly", self.fg_changed),
Expand All @@ -570,9 +570,24 @@ def create_static_widgets(self):
("disabled", self.fg_changed),
],
)
ttk.Style().configure("default.TEntry", fieldbackground=self.bg_entry)
ttk.Style().configure("changed.TEntry", fieldbackground=disp.bg_color)
ttk.Style().configure("changed.TEntry", foreground=self.fg_changed)
ttk.Style().map(
"default.TEntry",
fieldbackground=[
("!disabled", self.bg_entry),
("disabled", self.bg_entry),
],
)
ttk.Style().map(
"changed.TEntry",
fieldbackground=[
("!disabled", disp.bg_color),
("disabled", self.bg_entry),
],
foreground=[
("!disabled", self.fg_changed),
("disabled", self.fg_changed),
],
)

# Draw grid for common settings
self.entry_common = {}
Expand Down

0 comments on commit 0ed9a69

Please sign in to comment.