From 0680e5f566cd0effac3755b0f2949de441a937fd 2012-09-26 15:15:09 From: Michal Klocek Date: 2012-09-26 15:15:09 Subject: [PATCH] minor. removes hardcoded label padding drom datetime axis --- diff --git a/src/axis/datetimeaxis/chartdatetimeaxisx.cpp b/src/axis/datetimeaxis/chartdatetimeaxisx.cpp index 85fce51..481e312 100644 --- a/src/axis/datetimeaxis/chartdatetimeaxisx.cpp +++ b/src/axis/datetimeaxis/chartdatetimeaxisx.cpp @@ -26,9 +26,6 @@ #include #include - -static int label_padding = 5; - QTCOMMERCIALCHART_BEGIN_NAMESPACE ChartDateTimeAxisX::ChartDateTimeAxisX(QDateTimeAxis *axis,ChartPresenter *presenter) : HorizontalAxis(axis,presenter), @@ -94,7 +91,7 @@ QSizeF ChartDateTimeAxisX::sizeHint(Qt::SizeHint which, const QSizeF& constraint { QRectF rect = fn.boundingRect(ticksList.at(i)); width+=rect.width(); - height+=qMax(rect.height()+label_padding,height); + height+=qMax(rect.height()+labelPadding(),height); } sh = QSizeF(width,height); break; diff --git a/src/axis/datetimeaxis/chartdatetimeaxisy.cpp b/src/axis/datetimeaxis/chartdatetimeaxisy.cpp index 8e531a5..960a4ac 100644 --- a/src/axis/datetimeaxis/chartdatetimeaxisy.cpp +++ b/src/axis/datetimeaxis/chartdatetimeaxisy.cpp @@ -26,9 +26,6 @@ #include #include - -static int label_padding = 5; - QTCOMMERCIALCHART_BEGIN_NAMESPACE ChartDateTimeAxisY::ChartDateTimeAxisY(QDateTimeAxis *axis,ChartPresenter *presenter) : VerticalAxis(axis,presenter), @@ -95,7 +92,7 @@ QSizeF ChartDateTimeAxisY::sizeHint(Qt::SizeHint which, const QSizeF& constraint { QRectF rect = fn.boundingRect(ticksList.at(i)); width+=rect.width(); - height+=qMax(rect.height()+label_padding,height); + height+=qMax(rect.height()+labelPadding(),height); } sh = QSizeF(width,height); break;