@@ -522,7 +522,11 QColor QBarSet::labelColor() | |||
|
522 | 522 | */ |
|
523 | 523 | void QBarSet::setLabelColor(QColor color) |
|
524 | 524 | { |
|
525 | QBrush defaultBrush; | |
|
525 | 526 | QBrush b = labelBrush(); |
|
527 | if (b == defaultBrush) | |
|
528 | b.setStyle(Qt::SolidPattern); | |
|
529 | ||
|
526 | 530 | if (b.color() != color) { |
|
527 | 531 | b.setColor(color); |
|
528 | 532 | setLabelBrush(b); |
@@ -189,10 +189,12 void ChartTheme::decorate(QAbstractBarSeries *series, int index) | |||
|
189 | 189 | |
|
190 | 190 | // Pick label color from the opposite end of the gradient. |
|
191 | 191 | // 0.3 as a boundary seems to work well. |
|
192 | if (brush == sets.at(i)->labelBrush() || m_force) { | |
|
192 | 193 | if (takeAtPos < 0.3) |
|
193 | 194 | sets.at(i)->setLabelBrush(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1)); |
|
194 | 195 | else |
|
195 | 196 | sets.at(i)->setLabelBrush(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 0)); |
|
197 | } | |
|
196 | 198 | |
|
197 | 199 | if (pen == sets.at(i)->pen() || m_force) { |
|
198 | 200 | QColor c = colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 0.0); |
General Comments 0
You need to be logged in to leave comments.
Login now