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

Specifying opacity for palette and named colors

    XMLWordPrintable

Details

    Description

      I love that I can use palette colors in a Qt style sheet. It makes it possible to tweak the appearance while at the same time following the color guide lines given by the palette. However, I am missing the possibility of making a palette color transparent. I have a few possible solutions:

      1. Allow a second opacity parameter when specifying a palette color, e.g. color: palette(dark) 50%. This method is my favorite because it could also work for named colors, e.g. color: blue 40%. The second parameter should follow the same rules as the alpha value in the rgba function.
      2. Add a new palettea function that takes a second opacity argument.
      3. Extend the usage of todays opacity property to all widgets. This is the least favorable solution since the opacity would apply to all widget colors (e.g. background and border). In addition it would be impossible to specify different opacity for colors in a gradient.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            stian Stian Andre Olsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes