mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-06 01:53:25 -08:00
[Fonts] Migrate DeckList and InterfaceDefault surfaces to theme roles
This commit is contained in:
parent
d4f0b75e87
commit
dd15c1a5f9
45 changed files with 392 additions and 75 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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue