Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30649

The function "calcBlendColor" in the file texteditor.cpp return same color.

    XMLWordPrintable

Details

    • All
    • 592d7f0c9 (13.0)

    Description

      static QColor calcBlendColor(const QColor &baseColor, int level, int count);

      If count > 2, calcBlendColor(color, count - 1, count) == calcBlendColor(color, count - 2, count). They should be NOT same.

       

          if (level == count)
              return baseColor;
          if (level == 0)
              return color80;
          if (level == count - 1)
              return color90;
      
          const int blendFactor = level * (256 / (count - 2));
      
          return blendColors(color80, color90, blendFactor); 

       

      issue.png

       

      suggested:

       

      Attachments

        1. issue.png
          issue.png
          52 kB
        2. suggested.png
          suggested.png
          51 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            rongjian.yang RJ Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes