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
|
@ -106,7 +106,7 @@ BarSeries::~BarSeries()
|
||||||
BarSeries::BarLabel::BarLabel(StatsView &view, const std::vector<QString> &labels, int bin_nr, int binCount) :
|
BarSeries::BarLabel::BarLabel(StatsView &view, const std::vector<QString> &labels, int bin_nr, int binCount) :
|
||||||
isOutside(false)
|
isOutside(false)
|
||||||
{
|
{
|
||||||
QFont f; // make configurable
|
const QFont &f = view.getCurrentTheme().labelFont;
|
||||||
item = view.createChartItem<ChartTextItem>(ChartZValue::SeriesLabels, f, labels, true);
|
item = view.createChartItem<ChartTextItem>(ChartZValue::SeriesLabels, f, labels, true);
|
||||||
//highlight(false, bin_nr, binCount);
|
//highlight(false, bin_nr, binCount);
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
void setColor(const QColor &color); // Draw on transparent background
|
void setColor(const QColor &color); // Draw on transparent background
|
||||||
void setColor(const QColor &color, const QColor &background); // Fill rectangle with given background color
|
void setColor(const QColor &color, const QColor &background); // Fill rectangle with given background color
|
||||||
private:
|
private:
|
||||||
QFont f;
|
const QFont &f;
|
||||||
double fontHeight;
|
double fontHeight;
|
||||||
bool center;
|
bool center;
|
||||||
struct Item {
|
struct Item {
|
||||||
|
|
|
@ -21,7 +21,7 @@ InformationBox::InformationBox(StatsView &v) :
|
||||||
|
|
||||||
void InformationBox::setText(const std::vector<QString> &text, QPointF pos)
|
void InformationBox::setText(const std::vector<QString> &text, QPointF pos)
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(theme.informationBoxFont);
|
||||||
double fontHeight = fm.height();
|
double fontHeight = fm.height();
|
||||||
|
|
||||||
std::vector<double> widths;
|
std::vector<double> widths;
|
||||||
|
@ -37,6 +37,7 @@ void InformationBox::setText(const std::vector<QString> &text, QPointF pos)
|
||||||
|
|
||||||
ChartRectItem::resize(QSizeF(width, height));
|
ChartRectItem::resize(QSizeF(width, height));
|
||||||
|
|
||||||
|
painter->setFont(theme.informationBoxFont);
|
||||||
painter->setPen(QPen(theme.darkLabelColor)); // QPainter uses QPen to set text color!
|
painter->setPen(QPen(theme.darkLabelColor)); // QPainter uses QPen to set text color!
|
||||||
double y = 2.0 * informationBorder;
|
double y = 2.0 * informationBorder;
|
||||||
for (size_t i = 0; i < widths.size(); ++i) {
|
for (size_t i = 0; i < widths.size(); ++i) {
|
||||||
|
@ -71,7 +72,7 @@ void InformationBox::setPos(QPointF pos)
|
||||||
// Try to stay within three-thirds of the chart height
|
// Try to stay within three-thirds of the chart height
|
||||||
int InformationBox::recommendedMaxLines() const
|
int InformationBox::recommendedMaxLines() const
|
||||||
{
|
{
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(theme.informationBoxFont);
|
||||||
int maxHeight = static_cast<int>(sceneSize().height());
|
int maxHeight = static_cast<int>(sceneSize().height());
|
||||||
return maxHeight * 2 / fm.height() / 3;
|
return maxHeight * 2 / fm.height() / 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QFont>
|
|
||||||
|
|
||||||
struct dive;
|
struct dive;
|
||||||
class StatsView;
|
class StatsView;
|
||||||
|
@ -21,7 +20,6 @@ struct InformationBox : ChartRectItem {
|
||||||
int recommendedMaxLines() const;
|
int recommendedMaxLines() const;
|
||||||
private:
|
private:
|
||||||
const StatsTheme &theme; // Set once in constructor.
|
const StatsTheme &theme; // Set once in constructor.
|
||||||
QFont font; // For future specialization.
|
|
||||||
double width, height;
|
double width, height;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,10 @@ Legend::Legend(StatsView &view, const std::vector<QString> &names) :
|
||||||
QBrush(view.getCurrentTheme().legendColor), legendBoxBorderRadius),
|
QBrush(view.getCurrentTheme().legendColor), legendBoxBorderRadius),
|
||||||
displayedItems(0), width(0.0), height(0.0),
|
displayedItems(0), width(0.0), height(0.0),
|
||||||
theme(view.getCurrentTheme()),
|
theme(view.getCurrentTheme()),
|
||||||
font(QFont()), // Make configurable
|
|
||||||
posInitialized(false)
|
posInitialized(false)
|
||||||
{
|
{
|
||||||
entries.reserve(names.size());
|
entries.reserve(names.size());
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(theme.legendFont);
|
||||||
fontHeight = fm.height();
|
fontHeight = fm.height();
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (const QString &name: names)
|
for (const QString &name: names)
|
||||||
|
@ -98,7 +97,7 @@ void Legend::resize()
|
||||||
|
|
||||||
// Paint labels
|
// Paint labels
|
||||||
painter->setPen(theme.darkLabelColor); // QPainter uses pen not brush for text!
|
painter->setPen(theme.darkLabelColor); // QPainter uses pen not brush for text!
|
||||||
painter->setFont(font);
|
painter->setFont(theme.legendFont);
|
||||||
for (int i = 0; i < displayedItems; ++i) {
|
for (int i = 0; i < displayedItems; ++i) {
|
||||||
QPointF itemPos = entries[i].pos;
|
QPointF itemPos = entries[i].pos;
|
||||||
itemPos.rx() += fontHeight + 2.0 * legendBoxBorderSize;
|
itemPos.rx() += fontHeight + 2.0 * legendBoxBorderSize;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QFont>
|
|
||||||
|
|
||||||
class QFontMetrics;
|
class QFontMetrics;
|
||||||
class StatsTheme;
|
class StatsTheme;
|
||||||
|
@ -30,7 +29,6 @@ private:
|
||||||
double width;
|
double width;
|
||||||
double height;
|
double height;
|
||||||
const StatsTheme &theme; // Set once in constructor.
|
const StatsTheme &theme; // Set once in constructor.
|
||||||
QFont font;
|
|
||||||
// The position is specified with respect to the center and in relative terms
|
// The position is specified with respect to the center and in relative terms
|
||||||
// with respect to the canvas.
|
// with respect to the canvas.
|
||||||
QPointF centerPos;
|
QPointF centerPos;
|
||||||
|
|
|
@ -23,7 +23,7 @@ PieSeries::Item::Item(StatsView &view, const QString &name, int from, std::vecto
|
||||||
dives(std::move(divesIn)),
|
dives(std::move(divesIn)),
|
||||||
selected(allDivesSelected(dives))
|
selected(allDivesSelected(dives))
|
||||||
{
|
{
|
||||||
QFont f; // make configurable
|
const QFont &f = theme.labelFont;
|
||||||
QLocale loc;
|
QLocale loc;
|
||||||
|
|
||||||
int count = (int)dives.size();
|
int count = (int)dives.size();
|
||||||
|
|
|
@ -31,11 +31,7 @@ StatsAxis::StatsAxis(StatsView &view, const QString &title, bool horizontal, boo
|
||||||
title(title), horizontal(horizontal), labelsBetweenTicks(labelsBetweenTicks),
|
title(title), horizontal(horizontal), labelsBetweenTicks(labelsBetweenTicks),
|
||||||
size(1.0), zeroOnScreen(0.0), min(0.0), max(1.0), labelWidth(0.0)
|
size(1.0), zeroOnScreen(0.0), min(0.0), max(1.0), labelWidth(0.0)
|
||||||
{
|
{
|
||||||
// use a Light version of the application font for both labels and title
|
QFontMetrics fm(theme.axisTitleFont);
|
||||||
labelFont = QFont();
|
|
||||||
labelFont.setWeight(QFont::Light);
|
|
||||||
titleFont = labelFont;
|
|
||||||
QFontMetrics fm(titleFont);
|
|
||||||
titleWidth = title.isEmpty() ? 0.0
|
titleWidth = title.isEmpty() ? 0.0
|
||||||
: static_cast<double>(fm.size(Qt::TextSingleLine, title).width());
|
: static_cast<double>(fm.size(Qt::TextSingleLine, title).width());
|
||||||
}
|
}
|
||||||
|
@ -60,7 +56,7 @@ std::pair<double, double> StatsAxis::horizontalOverhang() const
|
||||||
// If the labels are between ticks, they cannot peak out
|
// If the labels are between ticks, they cannot peak out
|
||||||
if (!horizontal || labelsBetweenTicks)
|
if (!horizontal || labelsBetweenTicks)
|
||||||
return { 0.0, 0.0 };
|
return { 0.0, 0.0 };
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
auto [firstLabel, lastLabel] = getFirstLastLabel();
|
auto [firstLabel, lastLabel] = getFirstLastLabel();
|
||||||
return { fm.size(Qt::TextSingleLine, firstLabel).width() / 2.0,
|
return { fm.size(Qt::TextSingleLine, firstLabel).width() / 2.0,
|
||||||
fm.size(Qt::TextSingleLine, lastLabel).width() / 2.0 };
|
fm.size(Qt::TextSingleLine, lastLabel).width() / 2.0 };
|
||||||
|
@ -79,7 +75,7 @@ void StatsAxis::setRange(double minIn, double maxIn)
|
||||||
// margins.
|
// margins.
|
||||||
int StatsAxis::guessNumTicks(const std::vector<QString> &strings) const
|
int StatsAxis::guessNumTicks(const std::vector<QString> &strings) const
|
||||||
{
|
{
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
int minSize = fm.height();
|
int minSize = fm.height();
|
||||||
for (const QString &s: strings) {
|
for (const QString &s: strings) {
|
||||||
QSize labelSize = fm.size(Qt::TextSingleLine, s);
|
QSize labelSize = fm.size(Qt::TextSingleLine, s);
|
||||||
|
@ -101,8 +97,8 @@ double StatsAxis::titleSpace() const
|
||||||
{
|
{
|
||||||
if (title.isEmpty())
|
if (title.isEmpty())
|
||||||
return 0.0;
|
return 0.0;
|
||||||
return horizontal ? QFontMetrics(titleFont).height() + axisTitleSpaceHorizontal
|
return horizontal ? QFontMetrics(theme.axisTitleFont).height() + axisTitleSpaceHorizontal
|
||||||
: QFontMetrics(titleFont).height() + axisTitleSpaceVertical;
|
: QFontMetrics(theme.axisTitleFont).height() + axisTitleSpaceVertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
double StatsAxis::width() const
|
double StatsAxis::width() const
|
||||||
|
@ -117,7 +113,7 @@ double StatsAxis::height() const
|
||||||
{
|
{
|
||||||
if (!horizontal)
|
if (!horizontal)
|
||||||
return 0.0; // Only supported for horizontal axes
|
return 0.0; // Only supported for horizontal axes
|
||||||
return QFontMetrics(labelFont).height() + axisLabelSpaceHorizontal +
|
return QFontMetrics(theme.axisLabelFont).height() + axisLabelSpaceHorizontal +
|
||||||
titleSpace() +
|
titleSpace() +
|
||||||
(labelsBetweenTicks ? 0.0 : axisTickSizeHorizontal);
|
(labelsBetweenTicks ? 0.0 : axisTickSizeHorizontal);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +169,7 @@ void StatsAxis::setSize(double sizeIn)
|
||||||
labelWidth = label.width;
|
labelWidth = label.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
int fontHeight = fm.height();
|
int fontHeight = fm.height();
|
||||||
if (horizontal) {
|
if (horizontal) {
|
||||||
double pixmapWidth = size;
|
double pixmapWidth = size;
|
||||||
|
@ -192,7 +188,7 @@ void StatsAxis::setSize(double sizeIn)
|
||||||
img->fill(Qt::transparent);
|
img->fill(Qt::transparent);
|
||||||
|
|
||||||
painter->setPen(QPen(theme.darkLabelColor));
|
painter->setPen(QPen(theme.darkLabelColor));
|
||||||
painter->setFont(labelFont);
|
painter->setFont(theme.axisLabelFont);
|
||||||
for (const Label &label: labels) {
|
for (const Label &label: labels) {
|
||||||
double x = (label.pos - min) / (max - min) * size + offset.x() - round(label.width / 2.0);
|
double x = (label.pos - min) / (max - min) * size + offset.x() - round(label.width / 2.0);
|
||||||
QRectF rect(x, 0.0, label.width, fontHeight);
|
QRectF rect(x, 0.0, label.width, fontHeight);
|
||||||
|
@ -202,7 +198,7 @@ void StatsAxis::setSize(double sizeIn)
|
||||||
QRectF rect(offset.x() + round((size - titleWidth) / 2.0),
|
QRectF rect(offset.x() + round((size - titleWidth) / 2.0),
|
||||||
fontHeight + axisTitleSpaceHorizontal,
|
fontHeight + axisTitleSpaceHorizontal,
|
||||||
titleWidth, fontHeight);
|
titleWidth, fontHeight);
|
||||||
painter->setFont(titleFont);
|
painter->setFont(theme.axisTitleFont);
|
||||||
painter->drawText(rect, title);
|
painter->drawText(rect, title);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -221,7 +217,7 @@ void StatsAxis::setSize(double sizeIn)
|
||||||
img->fill(Qt::transparent);
|
img->fill(Qt::transparent);
|
||||||
|
|
||||||
painter->setPen(QPen(theme.darkLabelColor));
|
painter->setPen(QPen(theme.darkLabelColor));
|
||||||
painter->setFont(labelFont);
|
painter->setFont(theme.axisLabelFont);
|
||||||
for (const Label &label: labels) {
|
for (const Label &label: labels) {
|
||||||
double y = (min - label.pos) / (max - min) * size + offset.y() - round(fontHeight / 2.0);
|
double y = (min - label.pos) / (max - min) * size + offset.y() - round(fontHeight / 2.0);
|
||||||
QRectF rect(pixmapWidth - label.width, y, label.width, fontHeight);
|
QRectF rect(pixmapWidth - label.width, y, label.width, fontHeight);
|
||||||
|
@ -230,7 +226,7 @@ void StatsAxis::setSize(double sizeIn)
|
||||||
if (!title.isEmpty()) {
|
if (!title.isEmpty()) {
|
||||||
painter->rotate(-90.0);
|
painter->rotate(-90.0);
|
||||||
QRectF rect(round(-(offsetY + titleWidth) / 2.0), 0.0, titleWidth, fontHeight);
|
QRectF rect(round(-(offsetY + titleWidth) / 2.0), 0.0, titleWidth, fontHeight);
|
||||||
painter->setFont(titleFont);
|
painter->setFont(theme.axisTitleFont);
|
||||||
painter->drawText(rect, title);
|
painter->drawText(rect, title);
|
||||||
painter->resetTransform();
|
painter->resetTransform();
|
||||||
}
|
}
|
||||||
|
@ -309,7 +305,7 @@ void ValueAxis::updateLabels()
|
||||||
double act = actMin;
|
double act = actMin;
|
||||||
labels.reserve(num + 1);
|
labels.reserve(num + 1);
|
||||||
ticks.reserve(num + 1);
|
ticks.reserve(num + 1);
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
for (int i = 0; i <= num; ++i) {
|
for (int i = 0; i <= num; ++i) {
|
||||||
addLabel(fm, loc.toString(act, 'f', decimals), act);
|
addLabel(fm, loc.toString(act, 'f', decimals), act);
|
||||||
addTick(act);
|
addTick(act);
|
||||||
|
@ -369,7 +365,7 @@ void CountAxis::updateLabels()
|
||||||
|
|
||||||
labels.reserve(max + 1);
|
labels.reserve(max + 1);
|
||||||
ticks.reserve(max + 1);
|
ticks.reserve(max + 1);
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
for (int i = 0; i <= max; i += step) {
|
for (int i = 0; i <= max; i += step) {
|
||||||
addLabel(fm, loc.toString(i), static_cast<double>(i));
|
addLabel(fm, loc.toString(i), static_cast<double>(i));
|
||||||
addTick(static_cast<double>(i));
|
addTick(static_cast<double>(i));
|
||||||
|
@ -414,7 +410,7 @@ void CategoryAxis::updateLabels()
|
||||||
if (labelsText.empty())
|
if (labelsText.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
double size_per_label = size / static_cast<double>(labelsText.size()) - axisTickWidth;
|
double size_per_label = size / static_cast<double>(labelsText.size()) - axisTickWidth;
|
||||||
double fontHeight = fm.height();
|
double fontHeight = fm.height();
|
||||||
|
|
||||||
|
@ -511,7 +507,7 @@ void HistogramAxis::updateLabels()
|
||||||
if (first != 0)
|
if (first != 0)
|
||||||
addTick(bin_values.front().value);
|
addTick(bin_values.front().value);
|
||||||
int last = first;
|
int last = first;
|
||||||
QFontMetrics fm(labelFont);
|
QFontMetrics fm(theme.axisLabelFont);
|
||||||
for (int i = first; i < (int)bin_values.size(); i += step) {
|
for (int i = first; i < (int)bin_values.size(); i += step) {
|
||||||
const auto &[name, value, recommended] = bin_values[i];
|
const auto &[name, value, recommended] = bin_values[i];
|
||||||
addLabel(fm, name, value);
|
addLabel(fm, name, value);
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QFont>
|
|
||||||
|
|
||||||
class StatsView;
|
class StatsView;
|
||||||
class ChartLineItem;
|
class ChartLineItem;
|
||||||
|
@ -63,7 +62,6 @@ protected:
|
||||||
bool horizontal;
|
bool horizontal;
|
||||||
bool labelsBetweenTicks; // When labels are between ticks, they can be moved closer to the axis
|
bool labelsBetweenTicks; // When labels are between ticks, they can be moved closer to the axis
|
||||||
|
|
||||||
QFont labelFont, titleFont;
|
|
||||||
double size; // width for horizontal, height for vertical
|
double size; // width for horizontal, height for vertical
|
||||||
double zeroOnScreen;
|
double zeroOnScreen;
|
||||||
QPointF offset; // Offset of the label and title pixmap with respect to the (0,0) position.
|
QPointF offset; // Offset of the label and title pixmap with respect to the (0,0) position.
|
||||||
|
|
|
@ -51,6 +51,11 @@ public:
|
||||||
medianMarkerColor = Qt::red;
|
medianMarkerColor = Qt::red;
|
||||||
selectionLassoColor = Qt::black;
|
selectionLassoColor = Qt::black;
|
||||||
selectionOverlayColor = Qt::lightGray;
|
selectionOverlayColor = Qt::lightGray;
|
||||||
|
|
||||||
|
// use a light version of the application font for axis labels, axis title and chart title
|
||||||
|
axisLabelFont.setWeight(QFont::Light);
|
||||||
|
axisTitleFont.setWeight(QFont::Light);
|
||||||
|
titleFont.setWeight(QFont::Light);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
QString name() const
|
QString name() const
|
||||||
|
@ -118,6 +123,11 @@ public:
|
||||||
medianMarkerColor = Qt::cyan;
|
medianMarkerColor = Qt::cyan;
|
||||||
selectionLassoColor = Qt::white;
|
selectionLassoColor = Qt::white;
|
||||||
selectionOverlayColor = Qt::darkGray;
|
selectionOverlayColor = Qt::darkGray;
|
||||||
|
|
||||||
|
// use a bold version of the application font for axis labels, axis title and chart title
|
||||||
|
axisLabelFont.setWeight(QFont::Bold);
|
||||||
|
axisTitleFont.setWeight(QFont::Bold);
|
||||||
|
titleFont.setWeight(QFont::Bold);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
QString name() const
|
QString name() const
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
#include <QFont>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class QSGTexture;
|
class QSGTexture;
|
||||||
|
@ -39,6 +40,13 @@ public:
|
||||||
virtual QColor binColor(int bin, int numBins) const = 0;
|
virtual QColor binColor(int bin, int numBins) const = 0;
|
||||||
virtual QColor labelColor(int bin, size_t numBins) const = 0;
|
virtual QColor labelColor(int bin, size_t numBins) const = 0;
|
||||||
|
|
||||||
|
QFont axisLabelFont;
|
||||||
|
QFont axisTitleFont;
|
||||||
|
QFont informationBoxFont;
|
||||||
|
QFont labelFont;
|
||||||
|
QFont legendFont;
|
||||||
|
QFont titleFont;
|
||||||
|
|
||||||
// These are cashes for the QSG rendering engine
|
// These are cashes for the QSG rendering engine
|
||||||
// Note: Originally these were std::unique_ptrs, which automatically
|
// Note: Originally these were std::unique_ptrs, which automatically
|
||||||
// freed the textures on exit. However, destroying textures after
|
// freed the textures on exit. However, destroying textures after
|
||||||
|
|
|
@ -54,9 +54,6 @@ StatsView::StatsView(QQuickItem *parent) : QQuickItem(parent),
|
||||||
|
|
||||||
setAcceptHoverEvents(true);
|
setAcceptHoverEvents(true);
|
||||||
setAcceptedMouseButtons(Qt::LeftButton);
|
setAcceptedMouseButtons(Qt::LeftButton);
|
||||||
|
|
||||||
QFont font;
|
|
||||||
titleFont = QFont(font.family(), font.pointSize(), QFont::Light); // Make configurable
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StatsView::StatsView() : StatsView(nullptr)
|
StatsView::StatsView() : StatsView(nullptr)
|
||||||
|
@ -470,7 +467,7 @@ void StatsView::setTitle(const QString &s)
|
||||||
// Ooops. Currently we do not support setting the title twice.
|
// Ooops. Currently we do not support setting the title twice.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
title = createChartItem<ChartTextItem>(ChartZValue::Legend, titleFont, s);
|
title = createChartItem<ChartTextItem>(ChartZValue::Legend, currentTheme->titleFont, s);
|
||||||
title->setColor(currentTheme->darkLabelColor);
|
title->setColor(currentTheme->darkLabelColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "statshelper.h"
|
#include "statshelper.h"
|
||||||
#include "statsselection.h"
|
#include "statsselection.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QFont>
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QQuickItem>
|
#include <QQuickItem>
|
||||||
|
@ -144,7 +143,6 @@ private:
|
||||||
|
|
||||||
StatsState state;
|
StatsState state;
|
||||||
const StatsTheme *currentTheme;
|
const StatsTheme *currentTheme;
|
||||||
QFont titleFont;
|
|
||||||
std::vector<std::unique_ptr<StatsSeries>> series;
|
std::vector<std::unique_ptr<StatsSeries>> series;
|
||||||
std::unique_ptr<StatsGrid> grid;
|
std::unique_ptr<StatsGrid> grid;
|
||||||
std::vector<ChartItemPtr<QuartileMarker>> quartileMarkers;
|
std::vector<ChartItemPtr<QuartileMarker>> quartileMarkers;
|
||||||
|
|
Loading…
Add table
Reference in a new issue