mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: make fonts themeable
Move the various font objects the the StatsTheme structure to enable different font weights for different themes. For the dark theme, switch to a bold font, because the thin white font was barely visible. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5f91c69f9c
commit
144e81e8f8
13 changed files with 42 additions and 39 deletions
|
@ -54,9 +54,6 @@ StatsView::StatsView(QQuickItem *parent) : QQuickItem(parent),
|
|||
|
||||
setAcceptHoverEvents(true);
|
||||
setAcceptedMouseButtons(Qt::LeftButton);
|
||||
|
||||
QFont font;
|
||||
titleFont = QFont(font.family(), font.pointSize(), QFont::Light); // Make configurable
|
||||
}
|
||||
|
||||
StatsView::StatsView() : StatsView(nullptr)
|
||||
|
@ -470,7 +467,7 @@ void StatsView::setTitle(const QString &s)
|
|||
// Ooops. Currently we do not support setting the title twice.
|
||||
return;
|
||||
}
|
||||
title = createChartItem<ChartTextItem>(ChartZValue::Legend, titleFont, s);
|
||||
title = createChartItem<ChartTextItem>(ChartZValue::Legend, currentTheme->titleFont, s);
|
||||
title->setColor(currentTheme->darkLabelColor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue