ClassiCube / MCGalaxy

A Minecraft Classic / ClassiCube server software
GNU General Public License v3.0
168 stars 79 forks source link

PropertyGrids appear almost invisible with gnome DE + dark theme #659

Open UnknownShadow200 opened 2 years ago

UnknownShadow200 commented 2 years ago

The problem is that there are two 'colors' used for foreground text in controls - WindowText and ControlText

With a light / normal theme this is not an issue as both WindowText and ControlText produce black text image

However with a dark theme, although WindowText is still black, ControlText appears as white and is hence almost impossible to read image

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

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)