From 2749998f93577ca79d6edb686fab3454f31b7fe1 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 13 Sep 2011 13:44:42 +1000 Subject: [PATCH] Stop far right XTicker flowing into graph margin --- Graphs/gBarChart.cpp | 2 +- Graphs/gXAxis.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Graphs/gBarChart.cpp b/Graphs/gBarChart.cpp index 17ef2ba3..26311e92 100644 --- a/Graphs/gBarChart.cpp +++ b/Graphs/gBarChart.cpp @@ -379,7 +379,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event) day=m_days[zd]; x+=gYAxis::Margin+gGraphView::titleWidth; //graph->m_marginleft+ - int y=event->y()+rtop-10; + int y=event->y()+rtop-15; QDateTime dt=QDateTime::fromTime_t(hl_day*86400); diff --git a/Graphs/gXAxis.cpp b/Graphs/gXAxis.cpp index ab3dce14..c833009b 100644 --- a/Graphs/gXAxis.cpp +++ b/Graphs/gXAxis.cpp @@ -193,7 +193,8 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height) GetTextExtent(tmpstr,x,y); // this only really needs running once :( if (m_utcfix) tx+=step_pixels/2.0; - w.renderText(tmpstr,tx,top+18); + if ((tx+x)<(left+width)) + w.renderText(tmpstr,tx,top+18); py=px; for (int j=1;j