mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-09 11:33:25 -08:00
[Fonts] Restore DeckList Serif default and live-update all role readers
This commit is contained in:
parent
64150a32d4
commit
a3111995a4
18 changed files with 115 additions and 5 deletions
|
|
@ -514,6 +514,19 @@ UserListWidget::UserListWidget(TabSupervisor *_tabSupervisor,
|
|||
userTree->viewport()->update();
|
||||
userTree->update();
|
||||
});
|
||||
// Divider headers store their font on the item, so re-apply the role
|
||||
// family here; the painter reads the role live and needs only the
|
||||
// repaint below.
|
||||
connect(themeManager, &ThemeManager::fontsChanged, this, [this] {
|
||||
QFont dividerFont = themeManager->appFont(AppFont::InterfaceDefault);
|
||||
dividerFont.setBold(true);
|
||||
for (auto it = sectionItems.constBegin(); it != sectionItems.constEnd(); ++it) {
|
||||
it.value()->setFont(0, dividerFont);
|
||||
it.value()->setSizeHint(0, QSize(0, QFontMetrics(dividerFont).height() + 16));
|
||||
}
|
||||
userTree->viewport()->update();
|
||||
userTree->update();
|
||||
});
|
||||
}
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue