Re: [ncqgm/gnumed] Some dark theme patches/updates (PR #9)
Karsten Hilbert <[email protected]> Sat, 3 May 2025 16:05:03 +0200
| Newsgroups | gmane.comp.gnu.medical.devel |
|---|---|
| Message-ID | <[email protected]> |
> Hello! Some proposed updates to make GUI better with dark system themes: >=20 > - Login screen:=20 > In dark themes, change from blue text w/ dark background (barely= visible) TO white text w/ dark background. > In light themes, the text is still blue. >=20 > - In overview plugin, "Active Problems" section: > In dark themes, change from light yellow background w/ white tex= t (barely visible) TO blue background w/ white text. > Again, in light themes, the background is still light yellow and= text is dark (as original). Hello Maria, I have pulled the change and applied some improvements: - gmGuiHelpers.py now has is_probably_dark_theme() (which only does the calculation once per client start and logs its deci= sion) - use that function in login screen/patient overview code For 1-8-maint I have left in the changes to wxGladeWidgets/wxgPatientOverviewPnl.py. For the main branch, however, I chose another approach more in line with how GNUmed code is set up: - wxGlade is being used to create GUI layouts https://wxglade.sourceforge.net/ - one panel (wx.ScrolledPanel mainly) at a time, holding a few sizers and controls each - each panel is saved as a .wxg file client/wxg/wxgPatientOverviewPnl.wxg - wxGlade is used to generate Python code from the .wxg client/wxg/wxgPatientOverviewPnl.wxg -> client/wxGladeWidgets/wxgPatientO= verviewPnl.py - the generated code is imported from GNUmed code and subclassed client/wxpython/gmPatOverviewWidgets.py::cPatientOverviewPnl - in that subclass business logic is added and GUI adjustments are being applied this is where gmGuiHelpers.is_probably_dark_theme() is called now This way I can rearrange the GUI controls without having to mess around much with the business logic (because that lives in the subclass of the generated code). The login window code is not generated so I left things as-is in there. Thanks for the patch ! Karsten =2D-=20 GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B