From 2d00a21f202f55a26994913dceb6b85a09dd5dd5 Mon Sep 17 00:00:00 2001 From: nikolayromenskiy Date: Tue, 17 Sep 2024 14:37:19 +0300 Subject: [PATCH] Styles for display/settings.py --- display/settings.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/display/settings.py b/display/settings.py index 7eb7d07..abe6414 100644 --- a/display/settings.py +++ b/display/settings.py @@ -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), @@ -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 = {}