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

    • Suggestion
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 13.0.1
    • Qt Creator 13.0.0
    • Editors
    • None
    • 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
        For Gerrit Dashboard: QTCREATORBUG-30649
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes