mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
1212 Turned off shadow, changed to radial edge gradient to make the colors more easy to read.
This commit is contained in:
parent
3b4fec6196
commit
590f9995c8
@ -92,6 +92,7 @@ void RiuNightchartsWidget::clear()
|
|||||||
m_chart = Nightcharts();
|
m_chart = Nightcharts();
|
||||||
m_chart.setType(Nightcharts::Pie);
|
m_chart.setType(Nightcharts::Pie);
|
||||||
m_chart.setLegendType(Nightcharts::Vertical);
|
m_chart.setLegendType(Nightcharts::Vertical);
|
||||||
|
m_chart.setShadows(false);
|
||||||
|
|
||||||
m_marginLeft = 10;
|
m_marginLeft = 10;
|
||||||
m_marginTop = 10;
|
m_marginTop = 10;
|
||||||
|
8
ThirdParty/nightcharts/nightcharts.cpp
vendored
8
ThirdParty/nightcharts/nightcharts.cpp
vendored
@ -122,7 +122,8 @@ int Nightcharts::draw(QPainter *painter)
|
|||||||
double pdegree = 0;
|
double pdegree = 0;
|
||||||
|
|
||||||
//Options
|
//Options
|
||||||
QLinearGradient gradient(cX+0.5*cW,cY,cX+0.5*cW,cY+cH*2.5);
|
//QLinearGradient gradient(cX + 0.5*cW, cY, cX + 0.5*cW, cY + cH*2.5);
|
||||||
|
QRadialGradient gradient(cX + 0.5*cW, cY+0.5*cH, 0.5*cW);
|
||||||
gradient.setColorAt(1,Qt::black);
|
gradient.setColorAt(1,Qt::black);
|
||||||
|
|
||||||
|
|
||||||
@ -145,6 +146,11 @@ int Nightcharts::draw(QPainter *painter)
|
|||||||
for (int i=0;i<pieces.size();i++)
|
for (int i=0;i<pieces.size();i++)
|
||||||
{
|
{
|
||||||
gradient.setColorAt(0,pieces[i].rgbColor);
|
gradient.setColorAt(0,pieces[i].rgbColor);
|
||||||
|
// Added for radial gradient
|
||||||
|
gradient.setColorAt(0.85,pieces[i].rgbColor);
|
||||||
|
gradient.setColorAt(0.95,pieces[i].rgbColor.darker(120));
|
||||||
|
gradient.setColorAt(1,pieces[i].rgbColor.darker(140));
|
||||||
|
// <--
|
||||||
painter->setBrush(gradient);
|
painter->setBrush(gradient);
|
||||||
pen.setColor(pieces[i].rgbColor);
|
pen.setColor(pieces[i].rgbColor);
|
||||||
painter->setPen(pen);
|
painter->setPen(pen);
|
||||||
|
Loading…
Reference in New Issue
Block a user