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

Dark Title on Dark Windows 11 when running native Windows Style

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.0, 6.5.1, 6.6.0
    • 6.5.0 Beta3
    • Quick: Controls 2
    • None
    • Windows
    • 170fadadd (dev), 7b96dad1e (6.5), 489b070b6 (dev), 23d41c2b6 (6.5)

    Description

      The UI is correctly colored in light style, so the frame should be light as well.

      To decide whether a window should get a dark or a light window frame, qwindowswindow.cpp implements a helper static inline bool shouldApplyDarkFrame(const QWindow *w) that checks the default palette's QPalette::Window vs QPalette::WindowText color. QWindow has no concept of palette.

      Qt Quick, we can only override the palette to be light for Qt Quick Controls (as Qt Quick has no concept of style or palette), and the default QGuiApplication::palette still uses the platform theme's palette, and that is unchanged by the style.

      So, QWindowsWindow knows nothing about Qt Quick's styling and theming. Either we overwrite the default QGuiApplication::palette in the style (but then we have problems with recursion, and with handling changes of the system palette). Or we put logic into QQuickApplicationWindow to set a dynamic property on the QWindow (it could just be the palette). Then our static helper could check that property and use that instead of evaluating the default palette.

      Attachments

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

        Activity

          People

            santhoshkumar Santhosh Kumar Selvaraj
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes