diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2023-11-17 11:06:23 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2023-11-17 10:43:06 +0000 |
commit | 1da84754dba784d496622a8df9776b9855995d7c (patch) | |
tree | 503173f16fcf4ec7b150018a8a1118b08df7a25c /src/plugins/welcome | |
parent | b3acdae3386255324511119cd92d9012edf0eb9b (diff) |
Utils: Align enum StyleHelper::UiElement with upcoming design system #3
The Qt Creator Design System defines display headings H1 and H2 with a
"Titillium Web" font face.
This change introduces the "Titillium Web" based as new H1 and H2 and
lets the WelcomeScreen code obtain them via StyleHelper::UiFont(). It is
supposed to not change the visual appearance.
Change-Id: Ia2c5ac14858e574c4ffd31af1ed80ac1781cd970
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index acfa754633c..bfa77cc399b 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -24,6 +24,7 @@ #include <utils/icon.h> #include <utils/qtcassert.h> #include <utils/styledbar.h> +#include <utils/stylehelper.h> #include <utils/theme/theme.h> #include <utils/treemodel.h> @@ -175,10 +176,7 @@ public: hbox->addSpacing(16); - QFont welcomeFont = brandFont(); - welcomeFont.setPixelSize(30); - welcomeFont.setWeight(QFont::Light); - welcomeFont.setWordSpacing(2); + const QFont welcomeFont = StyleHelper::UiFont(StyleHelper::UiElementH1); auto welcomeLabel = new QLabel("Welcome to"); welcomeLabel->setFont(welcomeFont); @@ -263,7 +261,7 @@ public: vbox->addItem(newVBox); auto newLabel = new QLabel(Tr::tr("New to Qt?"), mainWidget); - newLabel->setFont(brandFont()); + newLabel->setFont(StyleHelper::UiFont(StyleHelper::UiElementH2)); newLabel->setAlignment(Qt::AlignHCenter); newVBox->addWidget(newLabel); |