Use enum for ThemeManager brushes (#5730)

* Use enum for ThemeManager brushes

This patch introduces an enum to distinguish the different brushes that
can be set by the theme (hand, stack, etc.) and generic functions taking
the enum rather than having one copy of each function for each brush.

This is preliminary work before merging StackZone and HandZone to
simplify #4974.

* Include <array> header

* Header spacing
This commit is contained in:
Basile Clement 2025-03-17 00:01:25 +01:00 committed by GitHub
parent 4ada011632
commit 2739550087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 58 additions and 99 deletions

View file

@ -172,7 +172,7 @@ void DeckViewCardContainer::paint(QPainter *painter, const QStyleOptionGraphicsI
{
qreal totalTextWidth = getCardTypeTextWidth();
painter->fillRect(boundingRect(), themeManager->getTableBgBrush());
painter->fillRect(boundingRect(), themeManager->getBgBrush(ThemeManager::Table));
painter->setPen(QColor(255, 255, 255, 100));
painter->drawLine(QPointF(0, separatorY), QPointF(width, separatorY));