-rw-r--r-- | noncore/apps/checkbook/graph.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/graph.cpp b/noncore/apps/checkbook/graph.cpp index 72da738..279285a 100644 --- a/noncore/apps/checkbook/graph.cpp +++ b/noncore/apps/checkbook/graph.cpp @@ -88,26 +88,27 @@ void Graph::initGraph() case GraphInfo::PieChart : { drawPieChart( width(), height(), data->totalValue() ); } }; } void Graph::drawBarChart( int width, int height, float max, float min ) { QPainter p( &graph ); // Try to set the font size smaller for text + // it would be nice to get _pCfg->getUseSmallFont here QFont f = font(); - f.setPointSize( 8 ); + f.setPointSize( f.pointSize()-1 ); p.setFont( f ); int x = 0; int i = 0; int n = data->numberDataPoints(); QFontMetrics fm=fontMetrics(); int fh = fm.height(); int fw; QColor c( 0, 0, 255); p.setBrush( c ); @@ -124,26 +125,27 @@ void Graph::drawBarChart( int width, int height, float max, float min ) p.drawText( width / 8 + x - fw / 2 + bw / 2, height - height / 8 - hoffset, fw, fh + height / 8, AlignTop | AlignHCenter, dp->label() ); i++; x += bw; } } void Graph::drawPieChart( int width, int height, float sum ) { QPainter p( &graph ); // Try to set the font size smaller for text + // it would be nice to get _pCfg->getUseSmallFont here QFont f = font(); - f.setPointSize( 8 ); + f.setPointSize( f.pointSize()-1 ); p.setFont( f ); int n = data->numberDataPoints(); int apos = -90 * 16; int xd = width - width / 5; int yd = height - height / 5; int i = 0; QColor c; |