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

OSX: with unified toolbar the toggled toolbar button has wrong background

XMLWordPrintable

    • macOS
    • ecd70c038ab06e8066710b89fe9f3bf841f72111

      On Mac OS X the background of the toolbar button looks wrong - see attached screenshots - the gradient looks different in the Qt app.

      Also, the left margin in Qt is smaller than in the native app.

      Here is the test app:

      #include <QtWidgets>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
      
          QMainWindow w;
          w.setUnifiedTitleAndToolBarOnMac(true);
      
          QIcon icon("/Applications//iBooks.app/Contents/PlugIns/iBAReaderKit.bundle/Contents/Resources/play-small-64-P.png");
      
          QToolBar *toolbar = w.addToolBar("maintoolbar");
          toolbar->setMovable(false);
          toolbar->setIconSize(QSize(32, 32));
          toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
          QAction *general = toolbar->addAction(icon, "General");
          QAction *account = toolbar->addAction(icon, "Account");
      
          general->setCheckable(true);
          general->setChecked(true);
      
          w.show();
      
          return app.exec();
      }
      

        1. native.png
          311 kB
          Denis Dzyubenko
        2. qt.png
          98 kB
          Denis Dzyubenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            ddenis Denis Dzyubenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes