Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-139200

windows11style checkbox has white check instead of dark one when in dark mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • 6.10
    • 6.9.0, 6.10.0 Beta2
    • Widgets: Styles
    • None
    • Windows 11 24H2
      QT 6.9.0, QT 6.10.0beta2
      windows11style
    • Windows
    • f26fd50d0a3b664ff9de6ac339137d854c533d55

      When in dark mode the checkbox check is white instead of black resulting in the check having next to no contrast and legibility issues. In Figma they specify the "Text on Accent/Primary" color for the checkbox color which is #000. Qt should change the color to black.

      Code:

      #include <QApplication>
      #include <QPushButton>
      #include <QCheckBox>
      #include <QRadioButton>
      #include <QMainWindow>
      #include <QMenuBar>
      #include <QVBoxLayout>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QMainWindow window;
          window.menuBar()->addMenu("&File")->addAction("&Quit")->setEnabled(true);
      
          QWidget *centralWidget = new QWidget;
          window.setCentralWidget(centralWidget);
      
          QVBoxLayout *layout = new QVBoxLayout(centralWidget);
      
          QPushButton *button = new QPushButton("Push Button");
          QCheckBox *checkBox = new QCheckBox("Check Box");
          QRadioButton *radioButton = new QRadioButton("Radio Button");
      
          layout->addWidget(button);
          layout->addWidget(checkBox);
          layout->addWidget(radioButton);
      
          window.resize(300, 200);
      
          window.show();
          return QApplication::exec();
      }  

      WinUI 3 gallery screenshot:

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            chehrlic Christian Ehrlicher
            paul34531 Paul .
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes