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
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
#include "settings_search_delegate.h"
|
||||
|
||||
#include "../interface/theme_manager.h"
|
||||
#include "settings_search_model.h"
|
||||
|
||||
#include <QBrush>
|
||||
|
|
@ -88,7 +89,8 @@ void SettingsSearchDelegate::paint(QPainter *painter,
|
|||
QRect textRect = contentRect.adjusted(iconOffset, 0, 0, 0);
|
||||
|
||||
// Breadcrumb: "Page > Group"
|
||||
QFont breadcrumbFont = option.font;
|
||||
// Family comes from the InterfaceDefault theme role; the -1 size and bold stay caller-side.
|
||||
QFont breadcrumbFont = themeManager->appFont(AppFont::InterfaceDefault);
|
||||
breadcrumbFont.setPointSize(breadcrumbFont.pointSize() - 1);
|
||||
breadcrumbFont.setBold(true);
|
||||
|
||||
|
|
@ -113,7 +115,7 @@ void SettingsSearchDelegate::paint(QPainter *painter,
|
|||
yPos += 20;
|
||||
|
||||
// Setting label
|
||||
QFont labelFont = option.font;
|
||||
QFont labelFont = themeManager->appFont(AppFont::InterfaceDefault);
|
||||
labelFont.setPointSize(labelFont.pointSize() + 1);
|
||||
labelFont.setBold(isSelected);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue