From c4469699fd72c8c6c604ef0df7740ec23ffed57a Mon Sep 17 00:00:00 2001 From: Caden Myers <158210249+cadenmyers13@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:35:24 -0500 Subject: [PATCH] style: change background color to match system (#243) * change background color to match system * news * Comply with dataset config panels * remove comment --- news/textbox-color.rst | 23 ++++++++++++++++++++ src/diffpy/pdfgui/gui/phaseconfigurepanel.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 news/textbox-color.rst diff --git a/news/textbox-color.rst b/news/textbox-color.rst new file mode 100644 index 00000000..d8c98f14 --- /dev/null +++ b/news/textbox-color.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Change background color to match system settings in `Phase Configuration`. + +**Security:** + +* diff --git a/src/diffpy/pdfgui/gui/phaseconfigurepanel.py b/src/diffpy/pdfgui/gui/phaseconfigurepanel.py index be3e74ce..88e6e3fd 100644 --- a/src/diffpy/pdfgui/gui/phaseconfigurepanel.py +++ b/src/diffpy/pdfgui/gui/phaseconfigurepanel.py @@ -321,6 +321,7 @@ def restrictConstrainedParameters(self): self.setToolTips(tooltips.phasepanel) self.textCtrlA.DefaultStyle.BackgroundColour + txtbg = self.textCtrlScaleFactor.DefaultStyle.BackgroundColour # First the TextCtrls for key, var in self.lConstraintsMap.items(): @@ -332,8 +333,7 @@ def restrictConstrainedParameters(self): tt.SetTip(self.constraints[var].formula) else: textCtrl.SetEditable(True) - # textCtrl.SetBackgroundColour(txtbg) - textCtrl.SetBackgroundColour(wx.WHITE) + textCtrl.SetBackgroundColour(txtbg) # Now the grid rows = self.gridAtoms.GetNumberRows()