On MSW, when you have a CollapsiblePane inside a Notebook page, the background color of the CollapsiblePane contrasts with the background color of the Notebook
Expected vs observed behaviour:
I would expect that the colors would match, or at least there would be an easy way to set the background colors to match, but I cannot do it.
I've found a similar problem described here: https://forums.wxwidgets.org/viewtopic.php?t=45014 , but no easy solution can be found there.
Patch or snippet allowing to reproduce the problem:
#include <wx/frame.h>
#include <wx/notebook.h>
#include <wx/collpane.h>
class MyApp : public wxApp
{
public:
virtual bool OnInit() {
wxFrame* frame = new wxFrame(nullptr, wxID_ANY, "Main");
wxNotebook* notebook = new wxNotebook(frame, wxID_ANY);
wxPanel* panel = new wxPanel(notebook, wxID_ANY);
notebook->AddPage(panel, "Page", true);
wxCollapsiblePane * pane = new wxCollapsiblePane(panel, wxID_ANY, "Collapsible pane");
wxWindow *paneWindow = pane->GetPane();
wxSizer *paneSizer = new wxBoxSizer(wxVERTICAL);
paneSizer->Add(new wxStaticText(paneWindow, wxID_ANY, "Text inside pane"), 1, wxGROW|wxALL, 2);
paneWindow->SetSizer(paneSizer);
paneSizer->SetSizeHints(paneWindow);
frame->Show(true);
return true;
}
};
wxIMPLEMENT_APP(MyApp);
To Reproduce:
Compare background color under the "Collapsible pane" text with the surrounding background color.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Do you intentionally use the classic theme? It's still supported, but it's really not supposed to be used without some awfully good reason. And I suspect your problem is specific to it and doesn't happen if you include a proper manifest.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Hmm, actually I take my words back, the problem can also be seen when using themes.
You still should use the manifest unless you have a good reason not to do it, but the bug must be fixed. I think it's a regression, but I'm not sure what could have broken (it's not WS_EX_COMPOSITING, for once).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks. :) In fact, the program for which I've noticed the issue is being build using MSVC. So the manifest is added automatically. Here I wanted to make a minimal reproducer of the issue, and I wasn't aware that lack of a manifest can make a difference.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #23274 as completed via 6bdac08.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #23274 as completed via #23278.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()