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

Fusion style: remove unneeded complexity from CC_TitleBar drawing

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.8
    • Widgets: Styles
    • None
    • All

    Description

      The drawing code for CC_TitleBar is unnecessary complex wrt the painting of the icons. It seems the idea was to use some kind of alpha blending for the painting but it was never implemented and the two colors have the same value since 2012:

      QColor textColor(active ? 0xffffff : 0xff000000);
      QColor textAlphaColor(active ? 0xffffff : 0xff000000 );
      

      Therefore the code should be cleaned up.

      Repoducer code:

      QMdiArea area;
      auto sub = new QMdiSubWindow;
      sub->setWindowIcon(sub->style()->standardIcon(QStyle::SP_MediaVolumeMuted));
      area.addSubWindow(sub);
      auto sub2 = new QMdiSubWindow;
      area.addSubWindow(sub2);
      sub->showNormal();
      sub2->showNormal();
      area.resize(100, 100);
      area.show();
      

      Attachments

        1. After_1.png
          4 kB
          Christian Ehrlicher
        2. After_2.png
          3 kB
          Christian Ehrlicher
        3. After_3.png
          4 kB
          Christian Ehrlicher
        4. Before_1.png
          4 kB
          Christian Ehrlicher
        5. Before_2.png
          3 kB
          Christian Ehrlicher
        6. Before_3.png
          5 kB
          Christian Ehrlicher
        For Gerrit Dashboard: QTBUG-131492
        # Subject Branch Project Status CR V

        Activity

          People

            chehrlic Christian Ehrlicher
            chehrlic Christian Ehrlicher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change