diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 9dcb516e62a..a5a61ab7bf9 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -942,7 +942,7 @@ static QStringList brandFontFamilies() return families; } -QFont StyleHelper::UiFont(UiElement element) +QFont StyleHelper::uiFont(UiElement element) { QFont font; diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index 8945c455337..b04bf685263 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -81,7 +81,7 @@ QTCREATOR_UTILS_EXPORT QColor sidebarShadow(); QTCREATOR_UTILS_EXPORT QColor toolBarDropShadowColor(); QTCREATOR_UTILS_EXPORT QColor notTooBrightHighlightColor(); -QTCREATOR_UTILS_EXPORT QFont UiFont(UiElement element); +QTCREATOR_UTILS_EXPORT QFont uiFont(UiElement element); // Sets the base color and makes sure all top level widgets are updated QTCREATOR_UTILS_EXPORT void setBaseColor(const QColor &color); diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index a939de2b34c..26f0a788574 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -570,7 +570,7 @@ void SettingsDialog::showPage(const Id pageId) void SettingsDialog::createGui() { - m_headerLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH4)); + m_headerLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH4)); auto headerHLayout = new QHBoxLayout; const int leftMargin = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin); diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index 45b3f475a18..7197236100d 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -181,9 +181,9 @@ void FancyToolButton::paintEvent(QPaintEvent *event) const bool isTitledAction = defaultAction() && defaultAction()->property("titledAction").toBool(); // draw popup texts if (isTitledAction && !m_iconsOnly) { - const QFont normalFont = StyleHelper::UiFont(StyleHelper::UiElementCaption); + const QFont normalFont = StyleHelper::uiFont(StyleHelper::UiElementCaption); QRect centerRect = rect(); - const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont boldFont = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); const QFontMetrics fm(normalFont); const QFontMetrics boldFm(boldFont); const int lineHeight = boldFm.height(); @@ -284,7 +284,7 @@ QSize FancyToolButton::sizeHint() const QSizeF buttonSize = iconSize().expandedTo(QSize(64, 38)); if (defaultAction() && defaultAction()->property("titledAction").toBool()) { - const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont boldFont = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); const QFontMetrics fm(boldFont); const qreal lineHeight = fm.height(); const int extraHeight = 10 // Spacing between top and projectName diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index 3269b55cbfd..39b0eaccb7c 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -68,7 +68,7 @@ QSize FancyTabBar::tabSizeHint(bool minimum) const Core::Constants::MODEBAR_ICONSONLY_BUTTON_SIZE / (minimum ? 3 : 1)}; } - const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont boldFont = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); const QFontMetrics fm(boldFont); const int spacing = 8; const int width = 60 + spacing + 2; @@ -283,7 +283,7 @@ static void paintIconAndText(QPainter *painter, const QRect &rect, const QIcon &icon, const QString &text, bool enabled, bool selected) { - const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont boldFont = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); painter->setFont(boldFont); const bool drawIcon = rect.height() > 36; diff --git a/src/plugins/coreplugin/iwelcomepage.cpp b/src/plugins/coreplugin/iwelcomepage.cpp index e094728dc9c..6b2cfa63b55 100644 --- a/src/plugins/coreplugin/iwelcomepage.cpp +++ b/src/plugins/coreplugin/iwelcomepage.cpp @@ -178,7 +178,7 @@ void WelcomePageButton::setSize(Size size) const int hMargin = size == SizeSmall ? 12 : 26; const int vMargin = size == SizeSmall ? 2 : 4; d->m_layout->setContentsMargins(hMargin, vMargin, hMargin, vMargin); - d->m_label->setFont(size == SizeSmall ? font() : StyleHelper::UiFont(StyleHelper::UiElementH2)); + d->m_label->setFont(size == SizeSmall ? font() : StyleHelper::uiFont(StyleHelper::UiElementH2)); } void WelcomePageButton::setWithAccentColor(bool withAccent) diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index ea25587922e..e63a21efdd3 100644 --- a/src/plugins/coreplugin/progressmanager/progressbar.cpp +++ b/src/plugins/coreplugin/progressmanager/progressbar.cpp @@ -166,7 +166,7 @@ QSize ProgressBar::sizeHint() const int width = 50; int height = PROGRESSBAR_HEIGHT + 5; if (m_titleVisible) { - const QFont font = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont font = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); const QFontMetrics fm(font); width = qMax(width, fm.horizontalAdvance(m_title) + 16); height += fm.height() + 5; @@ -213,7 +213,7 @@ void ProgressBar::paintEvent(QPaintEvent *) percent = 1; QPainter p(this); - const QFont fnt = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont fnt = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); const QFontMetrics fm(fnt); const int titleHeight = m_titleVisible ? fm.height() + 5 : 4; diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 6dceb339bf7..fdfe03e0905 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -661,7 +661,7 @@ void ProgressManagerPrivate::updateStatusDetailsWidget() } else if (progress->isSubtitleVisibleInStatusBar() && !progress->subtitle().isEmpty()) { if (!m_statusDetailsLabel) { m_statusDetailsLabel = new QLabel(m_summaryProgressWidget); - const QFont font = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); + const QFont font = StyleHelper::uiFont(StyleHelper::UiElementCaptionStrong); m_statusDetailsLabel->setFont(font); } m_statusDetailsLabel->setText(progress->subtitle()); diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index f1b6281d437..e561cf4385d 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -67,7 +67,7 @@ SearchBox::SearchBox(QWidget *parent) m_lineEdit = new FancyLineEdit; m_lineEdit->setFiltering(true); m_lineEdit->setFrame(false); - m_lineEdit->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + m_lineEdit->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); m_lineEdit->setMinimumHeight(33); m_lineEdit->setAttribute(Qt::WA_MacShowFocusRect, false); @@ -785,7 +785,7 @@ ListModel *SectionedGridView::addSection(const Section §ion, const QListsetContentsMargins(0, ItemGap, 0, 0); - sectionLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + sectionLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); auto scrollArea = qobject_cast(widget(0)); auto vbox = qobject_cast(scrollArea->widget()->layout()); @@ -842,7 +842,7 @@ void SectionedGridView::zoomInSection(const Section §ion) noMargin }.emerge(); sectionLabel->setContentsMargins(0, ItemGap, 0, 0); - sectionLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + sectionLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); auto gridView = new GridView(zoomedInWidget); gridView->setItemDelegate(m_itemDelegate); diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp index 7cd9eea59e3..ec4059e8c06 100644 --- a/src/plugins/projectexplorer/buildprogress.cpp +++ b/src/plugins/projectexplorer/buildprogress.cpp @@ -49,7 +49,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation warningLayout->addWidget(m_warningIcon); warningLayout->addWidget(m_warningLabel); - const QFont f = Utils::StyleHelper::UiFont(Utils::StyleHelper::UiElementCaptionStrong); + const QFont f = Utils::StyleHelper::uiFont(Utils::StyleHelper::UiElementCaptionStrong); m_errorLabel->setFont(f); m_warningLabel->setFont(f); m_errorLabel->setPalette(Utils::StyleHelper::sidebarFontPalette(m_errorLabel->palette())); diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp index 6f410fe4a93..8ef3b330a6c 100644 --- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp @@ -54,7 +54,7 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) : if (!BuildConfigurationFactory::find(m_target)) { auto noSettingsLabel = new QLabel(this); noSettingsLabel->setText(Tr::tr("No build settings available")); - noSettingsLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH4)); + noSettingsLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH4)); vbox->addWidget(noSettingsLabel); return; } @@ -126,7 +126,7 @@ void BuildSettingsWidget::addSubWidget(NamedWidget *widget) auto label = new QLabel(this); label->setText(widget->displayName()); - label->setFont(StyleHelper::UiFont(StyleHelper::UiElementH4)); + label->setFont(StyleHelper::uiFont(StyleHelper::UiElementH4)); label->setContentsMargins(0, 18, 0, 0); diff --git a/src/plugins/projectexplorer/panelswidget.cpp b/src/plugins/projectexplorer/panelswidget.cpp index 0278dd2282d..2754e17f375 100644 --- a/src/plugins/projectexplorer/panelswidget.cpp +++ b/src/plugins/projectexplorer/panelswidget.cpp @@ -100,7 +100,7 @@ void PanelsWidget::addPropertiesPanel(const QString &displayName) auto nameLabel = new QLabel(m_root); nameLabel->setText(displayName); nameLabel->setContentsMargins(0, ABOVE_HEADING_MARGIN, 0, 0); - nameLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH3)); + nameLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH3)); m_layout->addWidget(nameLabel); m_layout->addWidget(Layouting::createHr()); } diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index e804c7d527e..11d27bf441b 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -583,11 +583,11 @@ public: manageSessionsButton->setOnClicked([] { SessionManager::showSessionManager(); }); auto sessionsLabel = new QLabel(this); - sessionsLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + sessionsLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); sessionsLabel->setText(Tr::tr("Sessions")); auto recentProjectsLabel = new QLabel(this); - recentProjectsLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + recentProjectsLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); recentProjectsLabel->setText(Tr::tr("Projects")); auto sessionsList = new TreeView(this, "Sessions"); diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 0c81de04b71..40d4bdd8386 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -570,7 +570,7 @@ public: selectorView->setAutoFillBackground(true); auto activeLabel = new QLabel(Tr::tr("Active Project")); - activeLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH4)); + activeLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH4)); auto innerLayout = new QVBoxLayout; innerLayout->setSpacing(10); @@ -903,7 +903,7 @@ void SelectorDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti case 2: { QColor col = creatorTheme()->color(Theme::TextColorNormal); opt.palette.setColor(QPalette::Text, col); - opt.font = StyleHelper::UiFont(StyleHelper::UiElementH4); + opt.font = StyleHelper::uiFont(StyleHelper::UiElementH4); break; } } diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp index d191971fb24..e842bf4639c 100644 --- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp @@ -69,7 +69,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target) : runLabel->setBuddy(m_runConfigurationCombo); - const QFont f = Utils::StyleHelper::UiFont(Utils::StyleHelper::UiElementH4); + const QFont f = Utils::StyleHelper::uiFont(Utils::StyleHelper::UiElementH4); runTitle->setFont(f); deployTitle->setFont(f); @@ -498,7 +498,7 @@ void RunSettingsWidget::addSubWidget(QWidget *widget, QLabel *label) { widget->setContentsMargins({}); - label->setFont(Utils::StyleHelper::UiFont(Utils::StyleHelper::UiElementH4)); + label->setFont(Utils::StyleHelper::uiFont(Utils::StyleHelper::UiElementH4)); label->setContentsMargins(0, 18, 0, 0); diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index 72d4219a7d4..77aa3d51dd4 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -185,7 +185,7 @@ void TargetGroupItemPrivate::ensureWidget() auto label = new QLabel; label->setText(Tr::tr("No kit defined in this project.")); - label->setFont(StyleHelper::UiFont(StyleHelper::UiElementH4)); + label->setFont(StyleHelper::uiFont(StyleHelper::UiElementH4)); label->setContentsMargins(10, 10, 10, 10); label->setAlignment(Qt::AlignTop); diff --git a/src/plugins/scxmleditor/common/dragshapebutton.cpp b/src/plugins/scxmleditor/common/dragshapebutton.cpp index 4a4f0ae86ce..b15cd748b27 100644 --- a/src/plugins/scxmleditor/common/dragshapebutton.cpp +++ b/src/plugins/scxmleditor/common/dragshapebutton.cpp @@ -20,7 +20,7 @@ DragShapeButton::DragShapeButton(QWidget *parent) setMinimumSize(75, 75); setMaximumSize(75, 75); setIconSize(QSize(45, 45)); - setFont(Utils::StyleHelper::UiFont(Utils::StyleHelper::UiElementCaption)); + setFont(Utils::StyleHelper::uiFont(Utils::StyleHelper::UiElementCaption)); } void DragShapeButton::setShapeInfo(int groupIndex, int shapeIndex) diff --git a/src/plugins/welcome/introductionwidget.cpp b/src/plugins/welcome/introductionwidget.cpp index eac31ad2956..0ddfe937e43 100644 --- a/src/plugins/welcome/introductionwidget.cpp +++ b/src/plugins/welcome/introductionwidget.cpp @@ -78,7 +78,7 @@ IntroductionWidget::IntroductionWidget(QWidget *parent) m_continueLabel->setAlignment(Qt::AlignCenter); m_continueLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); m_continueLabel->setWordWrap(true); - m_continueLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH3)); + m_continueLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH3)); m_continueLabel->setPalette(palette()); layout->addWidget(m_continueLabel); m_bodyCss = "font-size: 16px;"; diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 38df46e629b..b7161fcb0dc 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -160,7 +160,7 @@ public: hbox->addSpacing(16); - const QFont welcomeFont = StyleHelper::UiFont(StyleHelper::UiElementH1); + const QFont welcomeFont = StyleHelper::uiFont(StyleHelper::UiElementH1); auto welcomeLabel = new QLabel("Welcome to"); welcomeLabel->setFont(welcomeFont); @@ -245,7 +245,7 @@ public: vbox->addItem(newVBox); auto newLabel = new QLabel(Tr::tr("New to Qt?"), mainWidget); - newLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); + newLabel->setFont(StyleHelper::uiFont(StyleHelper::UiElementH2)); newLabel->setAlignment(Qt::AlignHCenter); newVBox->addWidget(newLabel);