mirror of https://github.com/qt/qtgraphs.git
Make opacity work in LineSeries and SplineSeries
Pick-to: 6.9 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>
This commit is contained in:
parent
c07bb1d829
commit
2bf7482691
|
|
@ -141,13 +141,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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue