Make opacity work in LineSeries and SplineSeries

Pick-to: 6.8
Fixes: QTBUG-137718
Change-Id: I15fe45c88faa596adb0f13faa91d36c24509ecd6
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
(cherry picked from commit cc2154707b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2bf7482691)
This commit is contained in:
Niko Korkala 2025-06-17 14:50:27 +03:00 committed by Qt Cherry-pick Bot
parent 6ac732478f
commit 329f2d05e5
1 changed files with 3 additions and 0 deletions

View File

@ -127,13 +127,16 @@ PointRenderer::SeriesStyle PointRenderer::getSeriesStyle(PointGroup *group)
qsizetype index = group->colorIndex % seriesColors.size();
QColor color = group->series->color().alpha() != 0 ? group->series->color() : seriesColors.at(index);
color.setAlpha(color.alpha() * group->series->opacity());
QColor selectedColor = group->series->selectedColor().alpha() != 0
? group->series->selectedColor()
: m_graph->theme()->singleHighlightColor();
selectedColor.setAlpha(selectedColor.alpha() * group->series->opacity());
index = group->colorIndex % borderColors.size();
QColor borderColor = borderColors.at(index);
borderColor.setAlpha(borderColor.alpha() * group->series->opacity());
qreal borderWidth = theme->borderWidth();
return {