Open UnknownShadow200 opened 2 years ago
The problem is that there are two 'colors' used for foreground text in controls - WindowText and ControlText
WindowText
ControlText
With a light / normal theme this is not an issue as both WindowText and ControlText produce black text
However with a dark theme, although WindowText is still black, ControlText appears as white and is hence almost impossible to read
Although this was fixed for ListBoxes in 5b774651e36eb7973b989ba5485085c83bcfcb93 by changing from ControlText to WindowText, unfortunately some parts of PropertyGrid are hardcoded to draw text using ControlText https://github.com/mono/mono/blob/bdd772531d379b4e78593587d15113c37edd4a64/mcs/class/System.Windows.Forms/System.Windows.Forms/PropertyGridView.cs#L621
ListBox
So may not be possible to completely fix
EDIT: Also the category forecolor was buggy until recently - see mono pull request #19045 ([WinForms] Colorize PropertyGrid's Categories properly)
The problem is that there are two 'colors' used for foreground text in controls -
WindowText
andControlText
With a light / normal theme this is not an issue as both![image](https://user-images.githubusercontent.com/6509348/140910633-dd2c3c65-ca39-44bf-9732-04af685d10e2.png)
WindowText
andControlText
produce black textHowever with a dark theme, although![image](https://user-images.githubusercontent.com/6509348/140910974-9fab5267-37af-452c-9dad-1a10bd428391.png)
WindowText
is still black,ControlText
appears as white and is hence almost impossible to readAlthough this was fixed for
ListBox
es in 5b774651e36eb7973b989ba5485085c83bcfcb93 by changing fromControlText
toWindowText
, unfortunately some parts of PropertyGrid are hardcoded to draw text usingControlText
https://github.com/mono/mono/blob/bdd772531d379b4e78593587d15113c37edd4a64/mcs/class/System.Windows.Forms/System.Windows.Forms/PropertyGridView.cs#L621So may not be possible to completely fix
EDIT: Also the category forecolor was buggy until recently - see mono pull request #19045 ([WinForms] Colorize PropertyGrid's Categories properly)