mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
stats: don't pass StatsTheme in ChartItem::render
To make the qt-quick code of the statistics module more general, don't pass the StatsTheme in render calls to ChartItems. Items that need it, may just store a reference to the theme. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7aefd704c2
commit
4c43764b36
8 changed files with 46 additions and 40 deletions
|
|
@ -78,13 +78,13 @@ void PieSeries::Item::highlight(ChartPieItem &item, int bin_nr, bool highlight,
|
|||
QColor border = highlight ? theme.highlightedBorderColor : theme.borderColor;
|
||||
if (innerLabel)
|
||||
innerLabel->setColor(highlight ? theme.darkLabelColor : theme.labelColor(bin_nr, numBins), fill);
|
||||
item.drawSegment(angleFrom, angleTo, fill, border, selected, theme);
|
||||
item.drawSegment(angleFrom, angleTo, fill, border, selected);
|
||||
}
|
||||
|
||||
PieSeries::PieSeries(StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis, const QString &categoryName,
|
||||
std::vector<std::pair<QString, std::vector<dive *>>> data, ChartSortMode sortMode) :
|
||||
StatsSeries(view, xAxis, yAxis),
|
||||
item(view.createChartItem<ChartPieItem>(ChartZValue::Series, pieBorderWidth)),
|
||||
item(view.createChartItem<ChartPieItem>(ChartZValue::Series, theme, pieBorderWidth)),
|
||||
categoryName(categoryName),
|
||||
radius(0),
|
||||
highlighted(-1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue