Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-496

TerraTheme.darken(Color) doesn't preserve alpha channel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4, 1.5
    • 1.5
    • wtk-terra
    • None

    Description

      A color with alpha value which is darkened through TerraTheme.darken(Color) looses its alpha channel. This happens eg. with the borders around a TextArea. As a result, you cannot currently have a TextArea with transparent borders.

      The same applies to TerraTheme.brighten(Color).

      The error is in TerraTheme.adjustBrightness(Color color, float adjustment). It creates a new Color instance but invokes the wrong constructor so the alpha channel gets masked out.

      Attachments

        1. pivot-496-terratheme-color.patch
          0.7 kB
          Dirk Moebius
        2. test.wtkx
          0.9 kB
          Dirk Moebius

        Activity

          People

            Unassigned Unassigned
            dmoebius Dirk Moebius
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: