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

Fusion style: remove unneeded complexity from CC_TitleBar drawing

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • 6.9.1, 6.10.0 FF
    • 6.8
    • Widgets: Styles
    • None
    • All
    • 04e00e4e6 (dev), 091a54400 (6.9)

      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();
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes