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

MultiEffect shadowColor cannot be used for glow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8
    • 6.6.2
    • None
    • Linux/Wayland
    • d110993b1 (dev), 7401638c1 (6.8)

    Description

      Using Qt5Compat.GraphicalEffects, it's possible to make something glow with a specific colour:

      layer.effect: Glow {
          radius: 6
          samples: (radius * 2) + 1
          spread: 0.5
          color: "white"
      }
      

      When attempting to reproduce this using QtQuick.Effects' MultiEffect, the colour only appears black:

      layer.effect: MultiEffect {
          autoPaddingEnabled: true
          shadowEnabled: true
          shadowBlur: 1.0
          shadowColor: "white"
      }
      

      The documentation for MultiEffect suggests that shadowColor can be used to simulate a glow effect, but this is not possible.

      Here is a comparison of shadowColor as "white" (left) and "black" (right):

      and the desired appearance in the Qt5Compat.GraphicalEffects' glow:

      Attachments

        1. image-2024-03-15-23-44-18-203.png
          image-2024-03-15-23-44-18-203.png
          5 kB
        2. image-2024-03-15-23-45-19-024.png
          image-2024-03-15-23-45-19-024.png
          2 kB
        3. sc1_#000000_original.png
          sc1_#000000_original.png
          144 kB
        4. sc1_#000000_patch.png
          sc1_#000000_patch.png
          145 kB
        5. sc2_#60ffff00_original.png
          sc2_#60ffff00_original.png
          141 kB
        6. sc2_#60ffff00_patch.png
          sc2_#60ffff00_patch.png
          156 kB
        7. sc3_#ffffff_original.png
          sc3_#ffffff_original.png
          162 kB
        8. sc3_#ffffff_patch.png
          sc3_#ffffff_patch.png
          166 kB

        Issue Links

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

          Activity

            People

              kagro Kaj Grönholm
              olib Oliver Beard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes