@@ -26,9 +26,6 | |||||
26 | #include <QFontMetrics> |
|
26 | #include <QFontMetrics> | |
27 | #include <qmath.h> |
|
27 | #include <qmath.h> | |
28 |
|
28 | |||
29 |
|
||||
30 | static int label_padding = 5; |
|
|||
31 |
|
||||
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
33 |
|
30 | |||
34 | ChartDateTimeAxisX::ChartDateTimeAxisX(QDateTimeAxis *axis,ChartPresenter *presenter) : HorizontalAxis(axis,presenter), |
|
31 | ChartDateTimeAxisX::ChartDateTimeAxisX(QDateTimeAxis *axis,ChartPresenter *presenter) : HorizontalAxis(axis,presenter), | |
@@ -94,7 +91,7 QSizeF ChartDateTimeAxisX::sizeHint(Qt::SizeHint which, const QSizeF& constraint | |||||
94 | { |
|
91 | { | |
95 | QRectF rect = fn.boundingRect(ticksList.at(i)); |
|
92 | QRectF rect = fn.boundingRect(ticksList.at(i)); | |
96 | width+=rect.width(); |
|
93 | width+=rect.width(); | |
97 |
height+=qMax(rect.height()+label |
|
94 | height+=qMax(rect.height()+labelPadding(),height); | |
98 | } |
|
95 | } | |
99 | sh = QSizeF(width,height); |
|
96 | sh = QSizeF(width,height); | |
100 | break; |
|
97 | break; |
@@ -26,9 +26,6 | |||||
26 | #include <QDateTime> |
|
26 | #include <QDateTime> | |
27 | #include <qmath.h> |
|
27 | #include <qmath.h> | |
28 |
|
28 | |||
29 |
|
||||
30 | static int label_padding = 5; |
|
|||
31 |
|
||||
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
33 |
|
30 | |||
34 | ChartDateTimeAxisY::ChartDateTimeAxisY(QDateTimeAxis *axis,ChartPresenter *presenter) : VerticalAxis(axis,presenter), |
|
31 | ChartDateTimeAxisY::ChartDateTimeAxisY(QDateTimeAxis *axis,ChartPresenter *presenter) : VerticalAxis(axis,presenter), | |
@@ -95,7 +92,7 QSizeF ChartDateTimeAxisY::sizeHint(Qt::SizeHint which, const QSizeF& constraint | |||||
95 | { |
|
92 | { | |
96 | QRectF rect = fn.boundingRect(ticksList.at(i)); |
|
93 | QRectF rect = fn.boundingRect(ticksList.at(i)); | |
97 | width+=rect.width(); |
|
94 | width+=rect.width(); | |
98 |
height+=qMax(rect.height()+label |
|
95 | height+=qMax(rect.height()+labelPadding(),height); | |
99 | } |
|
96 | } | |
100 | sh = QSizeF(width,height); |
|
97 | sh = QSizeF(width,height); | |
101 | break; |
|
98 | break; |
General Comments 0
You need to be logged in to leave comments.
Login now