mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Faded out detail dot of filtered chart line.
This commit is contained in:
parent
423d2293f9
commit
41bc47eb6f
3 changed files with 9 additions and 9 deletions
|
@ -951,15 +951,13 @@ void ChartWidget::setupChartArea() {
|
||||||
QRect(bottom.x(), bottom.y(), bottom.width(), st::lineWidth),
|
QRect(bottom.x(), bottom.y(), bottom.width(), st::lineWidth),
|
||||||
st::windowSubTextFg);
|
st::windowSubTextFg);
|
||||||
}
|
}
|
||||||
{
|
for (const auto &dot : detailsPaintContext.dots) {
|
||||||
auto o = ScopedPainterOpacity(p, detailsAlpha);
|
p.setBrush(st::boxBg);
|
||||||
for (const auto &dot : detailsPaintContext.dots) {
|
p.setPen(QPen(dot.color, st::statisticsChartLineWidth));
|
||||||
p.setBrush(st::boxBg);
|
const auto r = st::statisticsDetailsDotRadius;
|
||||||
p.setPen(QPen(dot.color, st::statisticsChartLineWidth));
|
auto hq = PainterHighQualityEnabler(p);
|
||||||
const auto r = st::statisticsDetailsDotRadius;
|
auto o = ScopedPainterOpacity(p, dot.alpha * detailsAlpha);
|
||||||
auto hq = PainterHighQualityEnabler(p);
|
p.drawEllipse(dot.point, r, r);
|
||||||
p.drawEllipse(dot.point, r, r);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p.setPen(st::windowSubTextFg);
|
p.setPen(st::windowSubTextFg);
|
||||||
|
|
|
@ -60,6 +60,7 @@ void PaintLinearChartView(
|
||||||
detailsPaintContext.dots.push_back({
|
detailsPaintContext.dots.push_back({
|
||||||
QPointF(xPoint, yPoint),
|
QPointF(xPoint, yPoint),
|
||||||
line.color,
|
line.color,
|
||||||
|
p.opacity(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (first) {
|
if (first) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ struct DetailsPaintContext final {
|
||||||
struct Dot {
|
struct Dot {
|
||||||
QPointF point;
|
QPointF point;
|
||||||
QColor color;
|
QColor color;
|
||||||
|
float64 alpha = 0.;
|
||||||
};
|
};
|
||||||
std::vector<Dot> dots;
|
std::vector<Dot> dots;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue