comparison installer.cpp @ 85:bdd4317e43de

Mac layout bits
author Chris Cannam
date Wed, 26 Feb 2020 13:54:21 +0000
parents e77bcf5caedd
children 230e7433030d
comparison
equal deleted inserted replaced
84:e77bcf5caedd 85:bdd4317e43de
642 642
643 int selectionRow = 0; 643 int selectionRow = 0;
644 int checkColumn = 0; 644 int checkColumn = 0;
645 int titleColumn = 1; 645 int titleColumn = 1;
646 int statusColumn = 2; 646 int statusColumn = 2;
647 int infoColumn = 3; 647 int infoColumn = 4; // column 3 is a small sliver of spacing
648 648
649 selectionLayout->addWidget 649 selectionLayout->addWidget
650 (new QLabel(QObject::tr("<b>Vamp Plugin Pack</b> v%1") 650 (new QLabel(QObject::tr("<b>Vamp Plugin Pack</b> v%1")
651 .arg(PACK_VERSION)), 651 .arg(PACK_VERSION)),
652 selectionRow, titleColumn, 1, 3); 652 selectionRow, titleColumn, 1, 3);
661 checkAll->setChecked(true); 661 checkAll->setChecked(true);
662 selectionLayout->addWidget 662 selectionLayout->addWidget
663 (checkAll, selectionRow, checkColumn, Qt::AlignHCenter); 663 (checkAll, selectionRow, checkColumn, Qt::AlignHCenter);
664 ++selectionRow; 664 ++selectionRow;
665 665
666 auto checkArrow = new QLabel("&#9660;"); 666 auto checkArrow = new QLabel(
667 #ifdef Q_OS_MAC
668 "&nbsp;&nbsp;&#9660;"
669 #else
670 "&#9660;"
671 #endif
672 );
667 checkArrow->setTextFormat(Qt::RichText); 673 checkArrow->setTextFormat(Qt::RichText);
668 selectionLayout->addWidget 674 selectionLayout->addWidget
669 (checkArrow, selectionRow, checkColumn, Qt::AlignHCenter); 675 (checkArrow, selectionRow, checkColumn, Qt::AlignHCenter);
670 ++selectionRow; 676 ++selectionRow;
671 677
812 ++mainRow; 818 ++mainRow;
813 819
814 mainLayout->setRowStretch(0, 10); 820 mainLayout->setRowStretch(0, 10);
815 mainLayout->setColumnStretch(0, 10); 821 mainLayout->setColumnStretch(0, 10);
816 selectionLayout->setColumnMinimumWidth(0, 50); 822 selectionLayout->setColumnMinimumWidth(0, 50);
823 #ifdef Q_OS_MAC
824 selectionLayout->setColumnMinimumWidth(3, 10);
825 selectionLayout->setColumnMinimumWidth(5, 12);
826 #endif
817 selectionLayout->setColumnStretch(1, 10); 827 selectionLayout->setColumnStretch(1, 10);
818 828
819 QObject::connect 829 QObject::connect
820 (bb, &QDialogButtonBox::clicked, 830 (bb, &QDialogButtonBox::clicked,
821 [&](QAbstractButton *button) { 831 [&](QAbstractButton *button) {
899 #ifdef Q_OS_MAC 909 #ifdef Q_OS_MAC
900 QFont font(QApplication::font()); 910 QFont font(QApplication::font());
901 QString preferredFamily = "Lucida Grande"; 911 QString preferredFamily = "Lucida Grande";
902 font.setFamily(preferredFamily); 912 font.setFamily(preferredFamily);
903 if (QFontInfo(font).family() == preferredFamily) { 913 if (QFontInfo(font).family() == preferredFamily) {
914 font.setPointSize(12);
904 QApplication::setFont(font); 915 QApplication::setFont(font);
905 } 916 }
906 #endif 917 #endif
907 #endif 918 #endif
908 919