mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 10:03:26 -08:00
[Fonts] Migrate DeckList and InterfaceDefault surfaces to theme roles
This commit is contained in:
parent
a7e151d871
commit
d26a7b213f
44 changed files with 391 additions and 74 deletions
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ private slots:
|
|||
void goBack();
|
||||
void skip();
|
||||
void updateChrome();
|
||||
void applyInterfaceDefaultFont();
|
||||
|
||||
private:
|
||||
void addPage(FirstRunWizardPage *page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue