Skip to content

Fix appearance of wxTextCtrl with wxTE_RICH in dark mode in wxMSW - #25602

Merged
vadz merged 3 commits into
wxWidgets:masterfrom
vadz:msw-dark-text-attr
Jul 8, 2025
Merged

Fix appearance of wxTextCtrl with wxTE_RICH in dark mode in wxMSW#25602
vadz merged 3 commits into
wxWidgets:masterfrom
vadz:msw-dark-text-attr

Conversation

@vadz

@vadz vadz commented Jul 5, 2025

Copy link
Copy Markdown
Contributor

Use correct (the same as for plain EDIT) colours for it and also fix the border.

vadz added 3 commits July 5, 2025 19:47
Rich text controls still had light appearance, fix this and use the same
colours for them as for the plain EDIT ones in dark mode.

See wxWidgets#25573.

Closes wxWidgets#25576.
There is no need to call it only to pass to MSWCreateControl() overload
taking it when we can use another, simpler, overload which determines
the flags and extended flags to use itself -- and so calls MSWGetStyle()
only once instead of doing it twice as before, as it was still called
from MSWCreateControl() to fill in the extended style.

No real changes, this is just a micro-optimization.
For some reason the native RICHEDIT50W control automatically adds
WS_EX_CLIENTEDGE if the control has a border, and this looks ugly in
dark mode, so remove this extended style if it's present.
@vadz vadz added the MSW label Jul 5, 2025
@vadz
vadz merged commit f3df0dd into wxWidgets:master Jul 8, 2025
16 checks passed
@vadz
vadz deleted the msw-dark-text-attr branch July 8, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant