Default background colors are wrong
In various places, this library uses code like the following to obtain the default background color:
https://github.com/gabdube/native-windows-gui/blob/19938bd7b1d0a52055e66bd0705967f905796a81/native-windows-gui/src/win32/window.rs#L430
This code is missing a + 1 when reinterpreting a color constant as an HBrush. This results in a default background colour of COLOR_MENU rather than COLOR_WINDOW. See https://devblogs.microsoft.com/oldnewthing/20140305-00/?p=1593 for more details.
There are a few more incorrect HBRUSH casts for COLOR_WINDOW, and I also found this one for tab colors: https://github.com/gabdube/native-windows-gui/blob/057ed70cf85620bb44d816aef68f919eba4660fb/native-windows-gui/src/win32/tabs.rs#L23
Not sure if I missed some others
Well... not sure if I want to change the default background now that it's been that way for 12 versions. Nice to know why we I need to add a +1 to the color value though.
Well... not sure if I want to change the default background now that it's been that way for 12 versions. Nice to know why we I need to add a +1 to the color value though.
Hmm, ok. How about providing a convenient way for the user to correct it? At the moment I don't see a good way to customise anything about the window class without reimplementing a large chunk of window creation code.
Maybe I missed an easy way to change the window background though
Ok that's a good idea. I will add a new builder field for the window background
Uh, it's a little silly to not fix a blatant issue because people are using the version of the code that is wrong. This is why we have semantic versioning, to indicate breaking changes.
Ok that's a good idea. I will add a new builder field for the window background
Is it added yet? I can't find it