Skip to content

Commit

Permalink
set disabled fg to bordercolor (israel-dryer#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
israel-dryer authored Jan 3, 2022
1 parent 3672e7d commit b94715c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions development/tests/widget_styles/test_spinbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def create_spinbox_test(bootstyle, style):
spinbox.configure(state=tk.DISABLED)
spinbox.pack(padx=5, pady=5, fill=tk.BOTH)

# readonly
spinbox = ttk.Spinbox(frame)
spinbox.insert(tk.END, 'readonly')
spinbox.configure(state='readonly')
spinbox.pack(padx=5, pady=5, fill=tk.BOTH)

return frame


Expand Down
6 changes: 3 additions & 3 deletions src/ttkbootstrap/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def create_combobox_style(self, colorname=DEFAULT):
STYLE = "TCombobox"

if self.is_light_theme:
disabled_fg = Colors.update_hsv(self.colors.inputbg, vd=-0.2)
disabled_fg = self.colors.border
bordercolor = self.colors.border
readonly = self.colors.light
else:
Expand Down Expand Up @@ -2281,7 +2281,7 @@ def create_spinbox_style(self, colorname=DEFAULT):
STYLE = "TSpinbox"

if self.is_light_theme:
disabled_fg = Colors.update_hsv(self.colors.inputbg, vd=-0.2)
disabled_fg = self.colors.border
bordercolor = self.colors.border
readonly = self.colors.light
else:
Expand Down Expand Up @@ -3369,7 +3369,7 @@ def create_entry_style(self, colorname=DEFAULT):

# general default colors
if self.is_light_theme:
disabled_fg = Colors.update_hsv(self.colors.inputbg, vd=-0.2)
disabled_fg = self.colors.border
bordercolor = self.colors.border
readonly = self.colors.light
else:
Expand Down

0 comments on commit b94715c

Please sign in to comment.