From ed7ab8a854500b8840d9ebd6aa99a797ae9dcff8 2012-06-14 07:17:29 From: Tero Ahola Date: 2012-06-14 07:17:29 Subject: [PATCH] Fixed decoration of QLegend --- diff --git a/src/charttheme.cpp b/src/charttheme.cpp index d2fad69..1332072 100644 --- a/src/charttheme.cpp +++ b/src/charttheme.cpp @@ -118,13 +118,11 @@ void ChartTheme::decorate(QLegend *legend) QPen pen; QBrush brush; - if (pen == legend->pen() || m_force){ - legend->setPen(Qt::NoPen); - } + if (pen == legend->pen() || m_force) + legend->setPen(m_axisLinePen); - if (brush == legend->brush() || m_force) { + if (brush == legend->brush() || m_force) legend->setBrush(m_chartBackgroundGradient); - } } void ChartTheme::decorate(QAreaSeries *series, int index) diff --git a/src/legend/qlegend.cpp b/src/legend/qlegend.cpp index 97caf40..547eca3 100644 --- a/src/legend/qlegend.cpp +++ b/src/legend/qlegend.cpp @@ -389,8 +389,8 @@ QLegendPrivate::QLegendPrivate(ChartPresenter* presenter, QChart *chart, QLegend m_chart(chart), m_markers(new QGraphicsItemGroup(q)), m_alignment(Qt::AlignTop), - m_brush(Qt::SolidPattern), - m_pen(Qt::SolidLine), + m_brush(QBrush()), + m_pen(QPen()), m_offsetX(0), m_offsetY(0), m_minWidth(0),