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

SH_TitleBar_ModifyNotification should have a platform-specific default (and isn't really a widget style property)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.8, 5.9.8, Some future release
    • None
    • macOS

      Currently, the SH_TitleBar_ModifyNotification style hint is true by default, and relies on the widget style plugin to unset it.

      The property controls behaviour (indication of the modified state of a resource) that is potentially platform-specific, and indeed the only place where I have been able to find a different behaviour (an indicator in the window close button rather than the window title) is in the Mac Cocoa QPA.

      There are a few issues with this:

      • applications can use a different style, or opt to use the cross-platform Fusion style, as more and more seem to do. Fusion doesn't override the default SH_TitleBar_ModifyNotification hint, nor does any other style plugin I checked.
      • window decoration is not under control of the style plugin. Some style plugins for the Unix desktop do provide their own windowmanager decoration but that is done via a dedicated plugin for a specific window manager.

       

      As a result, applications using Fusion or another non-"native" style plugin on Mac will show 2 modified indicators if the title text contains the `[*]` placeholder. (In addition, if the title changes after toggling `windowModified` to true, the `*` will remain visible when the state is reset, until the title is changed again.)

       

      At the least the default SH_TitleBar_ModifyNotification value should be platform-specific, but I'd argue that this should in fact be an application attribute like `AA_DontUseNativeMenuBar` and `AA_MacDontSwapCtrlAndMeta`.

      If platforms exist where this property can indeed be under widget style control the style could still change the attribute.

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            rjvbertin René Bertin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes