diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index e6f520b7d13..de74a999407 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -952,12 +952,11 @@ QFont StyleHelper::UiFont(UiElement element) font.setPointSizeF(font.pointSizeF() * 1.2); font.setBold(true); break; - case UiElementPanelTitle: { + case UiElementCaptionStrong: font.setPointSizeF(panelTitleSize); font.setBold(true); break; - } - case UiElementPanelSubtitle: + case UiElementCaption: font.setPointSizeF(panelTitleSize); break; } diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index 4cda97ff569..8945c455337 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -52,8 +52,8 @@ enum UiElement { UiElementH2, UiElementH3, UiElementH4, - UiElementPanelTitle, - UiElementPanelSubtitle, + UiElementCaptionStrong, + UiElementCaption, }; // Height of the project explorer navigation bar diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index 908e002791c..45b3f475a18 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::UiElementPanelSubtitle); + const QFont normalFont = StyleHelper::UiFont(StyleHelper::UiElementCaption); QRect centerRect = rect(); - const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementPanelTitle); + 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::UiElementPanelTitle); + 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 19b0dfda475..3269b55cbfd 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::UiElementPanelTitle); + 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::UiElementPanelTitle); + const QFont boldFont = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); painter->setFont(boldFont); const bool drawIcon = rect.height() > 36; diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index fa1a3041658..ea25587922e 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::UiElementPanelTitle); + 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::UiElementPanelTitle); + 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 c7bc22f2a6c..6dceb339bf7 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::UiElementPanelTitle); + const QFont font = StyleHelper::UiFont(StyleHelper::UiElementCaptionStrong); m_statusDetailsLabel->setFont(font); } m_statusDetailsLabel->setText(progress->subtitle()); diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp index d6c654ce5cc..7cd9eea59e3 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::UiElementPanelTitle); + 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/scxmleditor/common/dragshapebutton.cpp b/src/plugins/scxmleditor/common/dragshapebutton.cpp index 307827cb00e..4a4f0ae86ce 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::UiElementPanelSubtitle)); + setFont(Utils::StyleHelper::UiFont(Utils::StyleHelper::UiElementCaption)); } void DragShapeButton::setShapeInfo(int groupIndex, int shapeIndex)