[Fonts] Migrate DeckList and InterfaceDefault surfaces to theme roles

This commit is contained in:
Lukas Brübach 2026-10-16 09:47:37 +02:00
parent a7e151d871
commit d26a7b213f
44 changed files with 391 additions and 74 deletions

View file

@ -1,5 +1,6 @@
#include "first_run_wizard.h"
#include "../interface/theme_manager.h"
#include "first_run_wizard_page.h"
#include "pages/account_setup_page.h"
#include "pages/card_database_setup_page.h"
@ -32,9 +33,8 @@ FirstRunWizard::FirstRunWizard(QWidget *parent) : QDialog(parent)
bannerHost = new BannerHost(this);
titleLabel = new QLabel(this);
QFont titleFont = QtUtils::boldFont(titleLabel->font());
titleFont.setPointSizeF(titleFont.pointSizeF() * 1.4);
titleLabel->setFont(titleFont);
applyInterfaceDefaultFont();
connect(themeManager, &ThemeManager::fontsChanged, this, &FirstRunWizard::applyInterfaceDefaultFont);
subtitleLabel = new QLabel(this);
subtitleLabel->setWordWrap(true);
@ -154,6 +154,16 @@ void FirstRunWizard::updateChrome()
}
}
void FirstRunWizard::applyInterfaceDefaultFont()
{
// Family comes from the InterfaceDefault theme role; the *1.4 size
// multiplier and bold weight stay caller-side as before.
QFont titleFont = themeManager->appFont(AppFont::InterfaceDefault);
titleFont.setPointSizeF(titleFont.pointSizeF() * 1.4);
titleFont.setBold(true);
titleLabel->setFont(titleFont);
}
void FirstRunWizard::goNext()
{
FirstRunWizardPage *page = pages[currentIndex];

View file

@ -55,6 +55,7 @@ private slots:
void goBack();
void skip();
void updateChrome();
void applyInterfaceDefaultFont();
private:
void addPage(FirstRunWizardPage *page);