Dark mode of Windows 11. If the application is in light color when it starts, the system will switch to light color after it starts. The wxRichTextCtrl will have a white frame. However, if the Dark mode is selected at startup, the display will function normally regardless of any subsequent color changes.
The version I'm using is 3.3.4.
Image: Image (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Can the problem be reproduced in the richtext sample? Do I understand correctly that to reproduce it you need to:
?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Yes, this way can reproduce the problem.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I cannot see a problem like this with the richtext sample. In your image, it seems the problematic white area surrounds the wxRichTextCtrl. Perhaps the wxRichTextCtrl is placed within another window and that is the window not updating upon switching from light to dark. In light mode, the default window background is gray and so it is common to have a call like below to make it white.
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
If your app does this, it should also have a system color change event handler (wxEVT_SYS_COLOUR_CHANGED) to repeat that setting.
It looks like there is also a problem with a different control, to the right of the Console text. It may be the same issue.
If this does not help, could you show a minimal example app that demonstrates the problem?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I solved the problem and figured out what caused it. If the wxSplitterWindow component adds child windows one by one, only the first one added can automatically update the theme color. There will be no problem if they are added together.
Code segment 1 is abnormal, while code segment 2 is good.
code1:
UI_Frame_Main::UI_Frame_Main(wxWindow *parent)
: Frame_Main(parent)
{
m_Splitter_center = new wxSplitterWindow(m_panel_main, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_LIVE_UPDATE | wxSP_3DSASH | wxSP_3DBORDER);
m_notebook_workspace = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT);
m_notebook_workspace->SetMinSize( wxSize( -1,100 ) );
m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM );
m_notebook_console->SetMinSize( wxSize( -1,160 ) );
}
code 2:
UI_Frame_Main::UI_Frame_Main(wxWindow *parent)
: Frame_Main(parent)
{
m_Splitter_center = new wxSplitterWindow(m_panel_main, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_LIVE_UPDATE | wxSP_3DSASH | wxSP_3DBORDER);
m_notebook_workspace = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_notebook_workspace->SetMinSize( wxSize( -1,100 ) );
m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize );
m_notebook_console->SetMinSize( wxSize( -1,160 ) );
m_Splitter_center->SplitHorizontally(m_notebook_workspace, m_notebook_console, 400);
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Sorry, It was my mistake in passing an incorrect parameter that caused the problem.
such as : m_notebook_console = new wxNotebook( m_Splitter_center, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM );
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()