Utils: Align enum StyleHelper::UiElement with upcoming design system #2

This change "PanelTitle" to "Caption". It is supposed to not change the
visual appearance.

Change-Id: I3342e6c80d8ce11b7ab1ac40b4395c265e1e07ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2023-11-17 11:02:38 +01:00
parent 7f60ce0666
commit b3acdae338
8 changed files with 14 additions and 15 deletions

View File

@@ -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