wxCheckBox without a label shows two white dots (wxMSW, Dark Mode) (Issue #26778)

7 views
Skip to first unread message

BazaarAcc32

unread,
5:08 AM (8 hours ago) 5:08 AM
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 created an issue (wxWidgets/wxWidgets#26778)

When creating a wxCheckBox, if you specify an empty string as the label, two white dots will appear on a black background. If you don't see them, change the Scale to, say, 175% and restart the application. These white dots will appear next to each checkbox when we select it.

scaled_checkbox.png (view on web)

To reproduce

#include <wx/wx.h>
#include <wx/msw/private.h>

class MyFrame : public wxFrame
{
public:
    MyFrame()
        : wxFrame(nullptr,
            wxID_ANY,
            "wxWidgets Dark Mode",
            wxDefaultPosition,
            wxSize(400, 300))
    {
        wxPanel* panel = new wxPanel(this);

        wxFlexGridSizer* sizer = new wxFlexGridSizer(0, 1, 8, 8);
        sizer->AddGrowableCol(0);

        for (int i = 0; i < 4; ++i)
        {
            wxCheckBox* checkBox = new wxCheckBox(panel, wxID_ANY, "");

            sizer->Add(checkBox,
                0,
                wxEXPAND | wxALL,
                8);
        }

        panel->SetSizer(sizer);

        Centre();
    }
};

class MyApp : public wxApp
{
public:
    bool OnInit() override
    {
        MSWEnableDarkMode(wxApp::DarkMode_Always);

        MyFrame* frame = new MyFrame();
        frame->Show();

        return true;
    }
};

wxIMPLEMENT_APP(MyApp);


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.Message ID: <wxWidgets/wxWidgets/issues/26778@github.com>

Steve Cornett

unread,
12:16 PM (1 hour ago) 12:16 PM
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26778)

I am unable to reproduce. I pasted your code over the minimal sample and verified wx_dpi_aware_pmv2.manifest is in the project. I tried 100% scale and 175% scale, tried 3.3.3 and the latest master. No luck.


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.Message ID: <wxWidgets/wxWidgets/issues/26778/5181717746@github.com>

Reply all
Reply to author
Forward
0 new messages