Faded out detail dot of filtered chart line.

This commit is contained in:
23rd 2023-07-14 18:06:35 +03:00 committed by John Preston
parent 423d2293f9
commit 41bc47eb6f
3 changed files with 9 additions and 9 deletions

View File

@ -951,15 +951,13 @@ void ChartWidget::setupChartArea() {
QRect(bottom.x(), bottom.y(), bottom.width(), st::lineWidth),
st::windowSubTextFg);
}
{
auto o = ScopedPainterOpacity(p, detailsAlpha);
for (const auto &dot : detailsPaintContext.dots) {
p.setBrush(st::boxBg);
p.setPen(QPen(dot.color, st::statisticsChartLineWidth));
const auto r = st::statisticsDetailsDotRadius;
auto hq = PainterHighQualityEnabler(p);
p.drawEllipse(dot.point, r, r);
}
for (const auto &dot : detailsPaintContext.dots) {
p.setBrush(st::boxBg);
p.setPen(QPen(dot.color, st::statisticsChartLineWidth));
const auto r = st::statisticsDetailsDotRadius;
auto hq = PainterHighQualityEnabler(p);
auto o = ScopedPainterOpacity(p, dot.alpha * detailsAlpha);
p.drawEllipse(dot.point, r, r);
}
p.setPen(st::windowSubTextFg);

View File

@ -60,6 +60,7 @@ void PaintLinearChartView(
detailsPaintContext.dots.push_back({
QPointF(xPoint, yPoint),
line.color,
p.opacity(),
});
}
if (first) {

View File

@ -21,6 +21,7 @@ struct DetailsPaintContext final {
struct Dot {
QPointF point;
QColor color;
float64 alpha = 0.;
};
std::vector<Dot> dots;
};